Edgewall Software
Modify

Opened 15 years ago

Closed 12 years ago

#5255 closed defect (duplicate)

Trac resource leak?

Reported by: ian@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.10.4
Severity: normal Keywords: mysql memory
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I've got a tracd setup that hosts 14 projects on a MySQL backend. Memory usage steadily climbs; I usually kill it off around 850mb. The sqlite backend has the same problem. Someone on #trac suggested I try disabling connection pooling in the MySQL backend which used up all the MySQL connections (dozens of connections per project, all sitting there idle.) The server is very low-use, the most significant traffic comes from search engines crawling it.

System is a Sun V20z running Debian 4.0 AMD64. MySQL 5.0 is installed from the Debian package, Trac 0.14.2 is installed from source.

Attachments (0)

Change History (14)

in reply to:  description comment:1 by Emmanuel Blot, 15 years ago

Replying to ian@dal-acm.ca:

Trac 0.14.2 is installed from source.

Did you mean 0.10.2 ? In any case, please fill in the version field of this ticket. Thanks.

comment:2 by ian@…, 15 years ago

Version: 0.10.4

Oof, that was dumb.

No, I meant 0.10.4

comment:3 by Christian Boos, 15 years ago

Resolution: duplicate
Status: newclosed

Seems a duplicate of #4347, the problem is not specific to a database. The out-of-memory condition is probably directly linked to the excessive amount of connections created.

If you use apache, try using less processes, e.g. by using the mpm_worker thread model.

comment:4 by ian@…, 15 years ago

Resolution: duplicate
Status: closedreopened

I'm certainly no expert with the trac codebase, but I don't think this is a duplicate of 4347. The excessive connections only occur when connection pooling is disabled in the backend. When I tried that, there was no particularly high memory usage (only around 60mb) because the trac instance couldn't connect to the DB to do anything. Just a glut of idle connections. That specific trait may well be a duplicate of 4347.

… but with pooling enabled, it behaves normally (no excessive connections), it just leaks memory like a sieve, which the other bug doesn't mention.

I'm using Apache but it's only handing things off to tracd.

in reply to:  4 comment:5 by pacopablo@…, 15 years ago

Replying to ian@dal-acm.ca:

I'm certainly no expert with the trac codebase, but I don't think this is a duplicate of 4347.

Yeah, this sounds like the exact opposite of #4347. It appears that there is a db connection leak, even when pooling is turned off.

I would expect his connections to top out at around 14 to 20, not balloon to 100. I had the connection leak on PostgreSQL and solved it by turning off connection pooling, but this seems to exasperated by turing off connection pooling.

comment:6 by Christian Boos, 15 years ago

Ok, seems a MySQL specific thing then. What version of the MySqlDb bindings are you using? If not already the latest, can you upgrade to the latest (1.2.2)?

in reply to:  6 comment:7 by ian@…, 15 years ago

Replying to cboos:

Ok, seems a MySQL specific thing then. What version of the MySqlDb bindings are you using? If not already the latest, can you upgrade to the latest (1.2.2)?

It's currently 1.2.1-p2-4 (Debian package)

I will try to upgrade.

comment:8 by sid, 15 years ago

Keywords: needinfo added

Did upgrading our bindings help?

comment:9 by ian@…, 15 years ago

No, still have the problem.

comment:10 by anonymous, 15 years ago

Keywords: mysql added; needinfo removed

comment:11 by Christian Boos, 15 years ago

Milestone: 2.0

comment:12 by Christian Boos, 14 years ago

Keywords: memory added

comment:13 by Christian Boos, 12 years ago

Milestone: 2.0unscheduled

Milestone 2.0 deleted

comment:14 by Christian Boos, 12 years ago

Milestone: triaging
Resolution: duplicate
Status: reopenedclosed

Very likely a kind of duplicate of #8443, and should be considerably better in starting with 0.12.1 (#9111).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.