Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1635 closed defect (fixed)

Trac leaks db connections with PgSQL and mod_python

Reported by: jaa-trac@… Owned by: Christopher Lenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: devel
Severity: major Keywords: pgsql
Cc: jaa-trac@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I installed Trac from trunk @ r1757, and when I used it with mod_python, I found that Trac is leaking 1 db connections per any action on Trac site (klick roadmap ⇒ +1 dbconn, klick timeline ⇒ +1 dbconn etc.)

Attachments (0)

Change History (6)

comment:1 by Christopher Lenz, 19 years ago

Status: newassigned

We're using a connection pool that will allocate up to 5 connections. Are you seeing the number of connections increase beyond that maximum?

comment:2 by jaa-trac@…, 19 years ago

yes, I thought that, 18 was when I stopped testing, because it was a kind-of-production server. =)

I think that roughly half of those were 'idle in transaction', and rest were just 'idle'. I was the only person/client who used trac at the moment.

comment:3 by Christopher Lenz, 19 years ago

Can you please check whether this problem still exists after [1804]? There have been a couple of fixes to the connection pooling since the time this ticket was created.

comment:4 by tjb@…, 19 years ago

The problem still exists as at [2006]. I ran up our mod_python interface, accessed trac, and watched the postgres connections - at 19 connections I stopped. There was a definite pattern of 1 connection left open for each transaction.

comment:5 by jaa, 19 years ago

Cc: jaa-trac@… added

Added me to CC: field. Why don't I get updates of this ticket, even when I am the reporter?

comment:6 by jaa-trac@…, 19 years ago

Resolution: fixed
Status: assignedclosed

I finally had time to upgrade our system to 0.9.x and I don't see this anymore. The system uses at the moment: Trac 0.9-stable@2529, pygpsql 2.4, pgsql 8.0.4, python 2.4.2, mod_python 3.1.4.

The upgrade was really smoosh, only hiccups was db16.py upgrade, and it was an easy one to fix (I had primary keys already in the table).

Very nice work, thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.