Opened 10 years ago

Closed 10 years ago

#713 closed defect (fixed)

petascope doesn't close database connections

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: minor Milestone: 9.0.x
Component: petascope Version: development
Keywords: Cc: Alireza
Complexity: Medium

Description

$ ps aux | grep petas
postgres  9952  0.0  0.1 1168884 7472 ?        Ss   Mar19   0:00 postgres: petauser petascopedb 127.0.0.1(20351) idle in transaction                                      
postgres 16809  0.0  0.1 1169028 9036 ?        Ss   Mar19   0:00 postgres: petauser petascopedb 127.0.0.1(33828) idle in transaction                                      
postgres 30223  0.0  0.1 1189268 11472 ?       Ss   Mar19   0:00 postgres: petauser petascopedb 127.0.0.1(52554) idle in transaction 

This is more of an annoyance, nothing critical, we just need to check if connections indeed need to stay open after a request is finished.

Change History (3)

comment:1 by Dimitar Misev, 10 years ago

Owner: changed from Piero Campalani to Dimitar Misev
Status: newassigned

As far as I can see there's a connection leak, the connection is not closed in many places.

comment:2 by Dimitar Misev, 10 years ago

Cc: Alireza added

DbMetadataSource.executePostGISQuery and DbMetadataSource.readDescription need to be checked as they don't seem to close !Statement and ResultSet objects.

I submitted patch to fix the connection leak by opening and closing the connection at every request. Next step is to have connection pooling.

comment:3 by Dimitar Misev, 10 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.