as creepy as the subject is, I've just configured a postgis datastore on
a trunk's instance, added a layer and went browse it with the openlayers
preview.
After a little while it complained with "Unable to obtain connection"
exception.
NOTE: the datastore is configured with "validate connections" and
"prepared statements". I thought it might be either of those options
causing the problem, but after trying the different combinations, it
seems to happen with any.
I happens after a bunch of GetFeatureInfo requests (by clicking on the
OL demo page).
ps shows a bunch of postgres processes "idle in transaction", and I
wonder why would they be in transaction for a GetFeatureInfo:
$ ps ax|grep postgres
13331 ? Ss 0:00 postgres: groldan 127.0.0.1(44594) idle
13339 ? Ss 0:00 postgres: medford 127.0.0.1(44596) idle in transaction
13547 ? Ss 0:01 postgres: medford 127.0.0.1(44608) idle in transaction
13705 ? Ss 0:00 postgres: medford 127.0.0.1(44617) idle in transaction
13710 ? Ss 0:00 postgres: medford 127.0.0.1(44618) idle in transaction
13711 ? Ss 0:00 postgres: medford 127.0.0.1(44619) idle in transaction
13712 ? Ss 0:00 postgres: medford 127.0.0.1(44620) idle in transaction
23 May 19:24:27 WARN [geotools.jdbc] - There is code leaving feature
readers/iterators open, this is leaking statements and connections!
23 May 19:25:29 WARN [geotools.jdbc] - Error occurred closing connection
Here's the full stack trace: <http://pastebin.com/vFURbHQw>
Does anyone saw this already or can confirm?
Cheers,
Gabriel
On Tue, May 24, 2011 at 12:39 AM, Gabriel Roldán <groldan@anonymised.com.1501…> wrote:
as creepy as the subject is, I’ve just configured a postgis datastore on
a trunk’s instance, added a layer and went browse it with the openlayers
preview.
After a little while it complained with “Unable to obtain connection”
exception.
NOTE: the datastore is configured with “validate connections” and
“prepared statements”. I thought it might be either of those options
causing the problem, but after trying the different combinations, it
seems to happen with any.
I happens after a bunch of GetFeatureInfo requests (by clicking on the
OL demo page).
ps shows a bunch of postgres processes “idle in transaction”, and I
wonder why would they be in transaction for a GetFeatureInfo:
$ ps ax|grep postgres
13331 ? Ss 0:00 postgres: groldan 127.0.0.1(44594) idle
13339 ? Ss 0:00 postgres: medford 127.0.0.1(44596) idle in transaction
13547 ? Ss 0:01 postgres: medford 127.0.0.1(44608) idle in transaction
13705 ? Ss 0:00 postgres: medford 127.0.0.1(44617) idle in transaction
13710 ? Ss 0:00 postgres: medford 127.0.0.1(44618) idle in transaction
13711 ? Ss 0:00 postgres: medford 127.0.0.1(44619) idle in transaction
13712 ? Ss 0:00 postgres: medford 127.0.0.1(44620) idle in transaction
23 May 19:24:27 WARN [geotools.jdbc] - There is code leaving feature
readers/iterators open, this is leaking statements and connections!
23 May 19:25:29 WARN [geotools.jdbc] - Error occurred closing connection
Here’s the full stack trace: <http://pastebin.com/vFURbHQw>
Does anyone saw this already or can confirm?
Haven’t seen it, no, but all the logs point to something that is using
the connection and not releasing it properly, which results in pool starvation
and in the “idle in transaction” error.
It is likely some new code bit or some recent modification that opens
a feature iterator without closing it.
Run GeoServer with -Dgt2.jdbc.trace=true and the logs will contain the
stack trace of the code that grabbed the unclosed iterator along with the
complaint that something did not close it.
Cheers
Andrea
–
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf