[Geoserver-users] ArcSDE connection pooling issues

Hi list,

we are running into connection pooling issues (using 1.6RC2), we now have
even increased the maximum number up to 25 (coming from 8), but still
Geoserver runs out of connections after a while. There is only 1 client
(OpenLayers based) active!

What could be the issue?

Caused by: java.util.NoSuchElementException: Could not aquire
feature:org.geotools.data.DataSourceException: The maximun of 25 to
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
server=geodatabase.ad.rws.nl, port=5151, instance=null, user=DID,
password=*****, minConnections=2, maxConnections=25, connTimeOut=1000] has
been reached

2008-02-20 11:17:03,298 WARN [org.geotools.arcsde.pool.ArcSDEConnectionPool]
- Out of connections: Timeout waiting for idle object
java.util.NoSuchElementException: Timeout waiting for idle object
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java(Compiled
Code))
        at
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectionPool.java(Compiled
Code))
        at
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataStore.java:963)
        at
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.java:249)
        at
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatureStore.java:76)
        at
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:164)
        at org.geoserver.wfs.Transaction.execute(Transaction.java:328)
        at org.geoserver.wfs.Transaction.transaction(Transaction.java:104)
        at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:156)
        at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
        at org.geoserver.wfs.WFSLogger.invoke(WFSLogger.java:44)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
        at $Proxy0.transaction(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor306.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at
org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurityInterceptor.java:41)
        at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:495)
        at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:188)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
        at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java(Compiled
Code))
        at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
        at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled
Code))
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:568)
Caused by: org.geotools.arcsde.pool.UnavailableArcSDEConnectionException:
The maximun of 8 to
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
server=geodatabase.ad.rws.nl, port=5151, instance=null, user=DID,
password=*****, minConnections=2, maxConnections=8, connTimeOut=1000] has
been reached
        at
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectionPool.java(Compiled
Code))
        at
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataStore.java:963)
        at
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.java:249)
        at
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatureStore.java:76)
        at
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:164)
        ... 61 more
2008-02-20 11:17:03,301 DEBUG
[org.geotools.arcsde.pool.ArcSDEConnectionPool] - Connection validated,
returned user DID
2008-02-20 11:17:03,301 INFO [org.geoserver.wfs] -
Request: transaction
        handle = null
        service = WFS
        version = 1.0.0
        baseUrl = http://145.50.148.45:8082/geoserver/
        lockId = null
        group =
[net.opengis.wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com
(feature: [Feature[ id=fid-121efd4e_11831468923_-7fa3 , OBJECTID=null ,
TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON (((135439.96200400835
421159.9247387089, 155040.01315245865 422279.9276614775, 148319.99561584712
400439.87066749, 135439.96200400835 421159.9247387089))) ]], handle: null,
idgen: <unset>, inputFormat: <unset>, srsName: null)]
        insert = [net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com
(feature: [Feature[ id=fid-121efd4e_11831468923_-7fa3 , OBJECTID=null ,
TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON (((135439.96200400835
421159.9247387089, 155040.01315245865 422279.9276614775, 148319.99561584712
400439.87066749, 135439.96200400835 421159.9247387089))) ]], handle: null,
idgen: <unset>, inputFormat: <unset>, srsName: null)]
        update =
        delete =
        native =
        releaseAction = ALL

TIA.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

Hi Bart,

My first thought is it may be a matter of balance bettween connection pool
size and pool's connTimeout argument. Did you try increasing the connTimeout
parameter in the DataStore config?

question though: is the openlayers client requesting tiles? I've to admit I
never tried a tiling client over arcsde layers myself, but it would make
sense to run out of connections depending on the ammount of tiles being
requested at a time and the ammount of layers composing the map.
Yet its though. I've been trying Saul's massgis WMS[1] through uDig before
replying to this message and it seems to perform well even requesting 20
layers at a time.

May be Saul (cc'ed) can give us a couple clues about how to set up a
production geoserver backed up by arcsde?

Saul: did you ever run into connection exhaustion issues with your server and,
if so, how did you solved them? is it just a matter of having a ton of
available connections? and did you ever tried hitting it with a tiling
client?

cheers,

Gabriel

[1]Massgis WMS server:
<http://giswebservices.massgis.state.ma.us/geoserver/wms?service=WMS&request=GetCapabilities&gt;

On Wednesday 20 February 2008 02:20:39 pm Bart van den Eijnden (OSGIS) wrote:

Hi list,

we are running into connection pooling issues (using 1.6RC2), we now have
even increased the maximum number up to 25 (coming from 8), but still
Geoserver runs out of connections after a while. There is only 1 client
(OpenLayers based) active!

What could be the issue?

Caused by: java.util.NoSuchElementException: Could not aquire
feature:org.geotools.data.DataSourceException: The maximun of 25 to
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
server=geodatabase.ad.rws.nl, port=5151, instance=null, user=DID,
password=*****, minConnections=2, maxConnections=25, connTimeOut=1000] has
been reached

2008-02-20 11:17:03,298 WARN
[org.geotools.arcsde.pool.ArcSDEConnectionPool] - Out of connections:
Timeout waiting for idle object
java.util.NoSuchElementException: Timeout waiting for idle object
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPo
ol.java(Compiled Code))
        at
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectio
nPool.java(Compiled Code))
        at
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataS
tore.java:963) at
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.jav
a:249) at
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatur
eStore.java:76) at
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:16
4) at org.geoserver.wfs.Transaction.execute(Transaction.java:328) at
org.geoserver.wfs.Transaction.transaction(Transaction.java:104) at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureSer
vice.java:156) at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown
Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java(Compiled Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop
Utils.java:292) at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoin
t(ReflectiveMethodInvocation.java:155) at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec
tiveMethodInvocation.java:122) at
org.geoserver.wfs.WFSLogger.invoke(WFSLogger.java:44)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec
tiveMethodInvocation.java:144) at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr
oxy.java:174) at $Proxy0.transaction(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor306.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java(Compiled Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at
org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurit
yInterceptor.java:41) at
org.geoserver.ows.Dispatcher.execute(Dispatcher.java:495) at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:188)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstra
ctController.java:139) at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(S
impleControllerHandlerAdapter.java:44) at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ
let.java:684) at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl
et.java:625) at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe
rvlet.java:392) at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.ja
va:357) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java(Compiled Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
hain.java(Compiled Code))
        at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacter
EncodingFilter.java:108) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java(Compiled Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
hain.java(Compiled Code))
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecu
rityInterceptor.java:107) at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSe
curityInterceptor.java:72) at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslati
onFilter.java:110) at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(An
onymousProcessingFilter.java:125) at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessi
ngFilter.java:178) at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(Http
SessionContextIntegrationFilter.java:229) at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
hainProxy.java(Compiled Code))
        at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
        at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98
) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java(Compiled Code))
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
hain.java(Compiled Code))
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
ava:213) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
ava:178) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
6) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10
5) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a:107) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
ection(Http11Protocol.java:744) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja
va:527) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW
orkerThread.java:80) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
va:684) at java.lang.Thread.run(Thread.java:568)
Caused by: org.geotools.arcsde.pool.UnavailableArcSDEConnectionException:
The maximun of 8 to
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
server=geodatabase.ad.rws.nl, port=5151, instance=null, user=DID,
password=*****, minConnections=2, maxConnections=8, connTimeOut=1000] has
been reached
        at
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectio
nPool.java(Compiled Code))
        at
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataS
tore.java:963) at
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.jav
a:249) at
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatur
eStore.java:76) at
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:16
4) ... 61 more
2008-02-20 11:17:03,301 DEBUG
[org.geotools.arcsde.pool.ArcSDEConnectionPool] - Connection validated,
returned user DID
2008-02-20 11:17:03,301 INFO [org.geoserver.wfs] -
Request: transaction
        handle = null
        service = WFS
        version = 1.0.0
        baseUrl = http://145.50.148.45:8082/geoserver/
        lockId = null
        group =
[net.opengis.wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com
(feature: [Feature[ id=fid-121efd4e_11831468923_-7fa3 , OBJECTID=null ,
TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON (((135439.96200400835
421159.9247387089, 155040.01315245865 422279.9276614775, 148319.99561584712
400439.87066749, 135439.96200400835 421159.9247387089))) ]], handle: null,
idgen: <unset>, inputFormat: <unset>, srsName: null)]
        insert = [net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com
(feature: [Feature[ id=fid-121efd4e_11831468923_-7fa3 , OBJECTID=null ,
TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON (((135439.96200400835
421159.9247387089, 155040.01315245865 422279.9276614775, 148319.99561584712
400439.87066749, 135439.96200400835 421159.9247387089))) ]], handle: null,
idgen: <unset>, inputFormat: <unset>, srsName: null)]
        update =
        delete =
        native =
        releaseAction = ALL

TIA.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4045,47bc2944165086491211187!