Opened 15 years ago

Closed 13 years ago

#20 closed defect (fixed)

Connection to postgres DBMS leaking

Reported by: Andrei Aiordachioaie Owned by: Peter Baumann
Priority: major Milestone:
Component: server Version: 8.1
Keywords: Cc:
Complexity: Medium

Description

It seems that every rasql query executes opens up a new postgresql connection, and never closes it before exiting. After a couple of hundreds of queries, the postgres DBMS decides to halt because the maximum number of connections has been reached.

Tested with the git repository version of rasdaman (8.1), on 2009-11-09.

Attached is a script that executes lots of rasql queries.

Attachments (1)

queries.sh (10.4 KB ) - added by Andrei Aiordachioaie 15 years ago.
Executes lots of rasql queries

Download all attachments as: .zip

Change History (4)

by Andrei Aiordachioaie, 15 years ago

Attachment: queries.sh added

Executes lots of rasql queries

comment:1 by Even Rouault <even.rouault@…>, 14 years ago

I can confirm the bug that I also see when using the new GDAL rasdaman driver.

At each run of gdalinfo "rasdaman:query='select a[\$x_lo:\$x_hi,\$y_lo:\$y_hi] from rgb as a'", a new PG connection is left idle. So if I run the above command 11 times, I get :

postgres  4864  1332  0 09:41 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4877  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4883  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4886  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4889  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4892  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4895  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4898  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4901  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4904  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle                                                                                      
postgres  4907  1332  0 09:42 ?        00:00:00 postgres: even RASBASE [local] idle

After about 96 attempts, I get the following errors :

ERROR 1: Serialisable exception r_Ebase_dbms: error in base DBMS.

and the next attempt :

ERROR 1: RasManager Error: Write transaction in progress, please retry again later.

After that, the only way to connect again is ./stop_rasdaman.sh && ./start_rasdaman.sh

My configuration : Ubuntu 10.04 64bit, postgresql-8.4 (8.4.4-0ubuntu10.04) and a rasdaman git tree pulled on the 2010-09-03

comment:2 by Peter Baumann, 13 years ago

Owner: changed from cjucovschi to Peter Baumann
Status: newassigned

comment:3 by Peter Baumann, 13 years ago

Resolution: fixed
Status: assignedclosed

fixed by patch to reladminif/database.pgc.

Note: See TracTickets for help on using tickets.