[Geoserver-users] GeoServer rendering failed on connection pool error

Hi All,

I sometimes saw the following errors in Tomcat log when tried to render OSM
dataset and not sure what caused it.
I set max_connections in my OSM datastores to 100. Can someone tell me what
happens and how to fix the problem? Here is server configuration:

GeoServer-2.4
Tomcat 7
PostgreSQL 9.3/PostGIS 2.2

org.geoserver.platform.ServiceException: Rendering process failed
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:507)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:251)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:123)
  at org.geoserver.wms.GetMap.executeInternal(GetMap.java:521)
  at org.geoserver.wms.GetMap.run(GetMap.java:253)
  at org.geoserver.wms.GetMap.run(GetMap.java:124)
  at
org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:328)
  at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
  at
org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:61)
  at
org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:35)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:79)
  at
org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:54)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:54)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
  at com.sun.proxy.$Proxy61.getMap(Unknown Source)
  at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:774)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:272)
  at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
  at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
  at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
  at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
  at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)
  at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
  at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:48)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
  at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
  at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
  at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
  at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
  at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.RuntimeException: Unable to obtain connection: Cannot
get a connection, pool error Timeout waiting for idle object
  at
org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1679)
  at org.geotools.jdbc.JDBCDataStore.getConnection(JDBCDataStore.java:1619)
  at org.geotools.jdbc.JDBCDataStore.getConnection(JDBCDataStore.java:1649)
  at
org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:557)
  at
org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:563)
  at
org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:165)
  at
org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:45)
  at
org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:31)
  at
org.geotools.renderer.lite.StreamingRenderer.drawPlain(StreamingRenderer.java:2481)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2051)
  at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:837)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:481)
  ... 113 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool error Timeout waiting for idle object
  at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
  at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
  at
org.geotools.data.jdbc.datasource.AbstractManageableDataSource.getConnection(AbstractManageableDataSource.java:48)
  at
org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1665)
  ... 124 more
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
  at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1134)
  at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
  ... 127 more

Many thanks in advance.

Regards,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao,
the log is clear:

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool error Timeout waiting for idle object

you are running out of connections from the pool.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Ciao,
please, keep the discussion on the ml.

See my comments inline below…

···

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Fri, Feb 21, 2014 at 4:39 PM, tam tran <tt9488@anonymised.com> wrote:

Hi Simone,

Thanks for your response. I know the log is clear that the connection pool is full. But what is the cause? Does it mean the max_connection = 100 that I allocated to the datastores in GeoServer is too high? In order words, I need to know what causes it and how do I fix the problem. Is it in datastores configuration, Tomcat configuration, or postgresql.conf? Any help is greatly appreciated.

By default postgresql won’t allow more than 100 connections so 100 as Max in geoserver pool config is just as much as pg can handle without changes to the config.

That said, I believe your problem is that somehow you are using more than 100 concurrent connection and the thread handling the N-th request is dying waiting for a new connection
which is not being made available.

Regards,

Tam

On Fri, Feb 21, 2014 at 4:48 AM, Simone Giannecchini <simone.giannecchini@anonymised.com> wrote:

Ciao,
the log is clear:

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
connection, pool error Timeout waiting for idle object

you are running out of connections from the pool.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hello,

This issue is comming from the fact that you are probably using more than the 100 connections of the postgres due
to an high number of Stores defined.

The solution is:
     - augment the number of connections in your database
     - or go to define the connection pool on tomcat level. (the better solution)

http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jndi/tomcat-jndi.html

Regards,

Eric Smets

Op 21/02/2014 17:01, Simone Giannecchini schreef:

Ciao,
please, keep the discussion on the ml.

See my comments inline below...

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Fri, Feb 21, 2014 at 4:39 PM, tam tran <tt9488@anonymised.com <mailto:tt9488@anonymised.com>> wrote:

    Hi Simone,

    Thanks for your response. I know the log is clear that the connection
    pool is full. But what is the cause? Does it mean the max_connection =
    100 that I allocated to the datastores in GeoServer is too high? In order
    words, I need to know what causes it and how do I fix the problem. Is it
    in datastores configuration, Tomcat configuration, or postgresql.conf? Any help is greatly appreciated.

By default postgresql won't allow more than 100 connections so 100 as Max in geoserver pool config is just as much as pg can handle without changes to the config.

That said, I believe your problem is that somehow you are using more than 100 concurrent connection and the thread handling the N-th request is dying waiting for a new connection
which is not being made available.

    Regards,
    Tam

    On Fri, Feb 21, 2014 at 4:48 AM, Simone Giannecchini
    <simone.giannecchini@anonymised.com
    <mailto:simone.giannecchini@anonymised.com>> wrote:

        Ciao,
        the log is clear:

        Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
        connection, pool error Timeout waiting for idle object

        you are running out of connections from the pool.

        Regards,
        Simone Giannecchini
        ==
        Our support, Your Success! Visit http://opensdi.geo-solutions.it for
        more information.
        ==

        Ing. Simone Giannecchini
        @simogeo
        Founder/Director

        GeoSolutions S.A.S.
        Via Poggio alle Viti 1187
        55054 Massarosa (LU)
        Italy
        phone: +39 0584 962313 <tel:%2B39%200584%20962313>
        fax: +39 0584 1660272 <tel:%2B39%200584%201660272>
        mob: +39 333 8128928 <tel:%2B39%20%C2%A0333%208128928>

        http://www.geo-solutions.it
        http://twitter.com/geosolutions_it

        -------------------------------------------------------

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Eric Smets eric.smets@anonymised.com
FKS bvba - Formal and Knowledge Systems http://www.fks.be/
Schampbergstraat 32 Tel: ++32-(0)11-21 49 11
B-3511 Hasselt Fax: ++32-(0)11-22 04 19

Thank you. I will try the tomcat jndi.

Regards,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5105156.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi
I'm also encountering this problem occasionally, but I only set 'Max
Connections' to 10 (so I don't think it's exceeding the 100 connections that
postgres allows by default). I have only configured one datastore, and
traffic is not heavy. Most of the time things are working fine, but
occasionally I get exactly the same stack trace. The map would start to lag,
and then the "Unable to obtain connection: Cannot get a connection, pool
error Timeout waiting for idle object " error would appear.

Just to see what might happen, I tried reducing 'Max Connections' to 1, but
things were working fine. I couldn't find a pattern of when this problem
occurs.

What I'm using:
GeoServer-2.6.2
Tomcat 7
PostgreSQL 8.4

I'm wondering if anyone has ideas on what might cause this problem?

Some people suggested configuring a JNDI Connection Pool with Tomcat instead
of using Apache Commons connection pool, and setting 'maxActive' to -1.
https://cgsrv1.arrc.csiro.au/blog/2011/05/26/troubleshooting-guide-for-common-geoserver-problems-during-deployment/
http://comments.gmane.org/gmane.comp.gis.geoserver.user/40336

Would you recommend to try this approach too?

Thanks
E

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216611.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Thu, Jul 23, 2015 at 5:45 AM, eting123 <eting@anonymised.com> wrote:

Hi
I'm also encountering this problem occasionally, but I only set 'Max
Connections' to 10 (so I don't think it's exceeding the 100 connections
that
postgres allows by default). I have only configured one datastore, and
traffic is not heavy. Most of the time things are working fine, but
occasionally I get exactly the same stack trace. The map would start to
lag,
and then the "Unable to obtain connection: Cannot get a connection, pool
error Timeout waiting for idle object " error would appear.

10 connections are not many, if you have 10 WFS downloads going on at
any single time, they will keep the connections busy for as much time as it
takes to complete them.
I'd suggest to increase them if possible, making the value unlimited is not
an option, the DBMS will eventually deny you the extra connections (check
with your DBS/installation what's the limit)

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Thanks Andrea, I'll try that.

Would you also suggest that I modify the ‘Max connection idle time’ and/or
‘Evictor run periodically’? So that idle objects are cleaned up more
frequently?

Thanks
E

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216749.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

We also have more questions:
1. We have been using the same settings (ie, max connections = 10) with
Geoserver 2.0.2. We have used that for several years and never had this
problem. This problem started happening when we switched to Geoserver 2.6.2.
Just wondering if this is caused by some change in the Geoserver code (for
example, it needs to hit the database more frequently...)?

2. Sometimes we would observe that the map really lags as we navigate around
(we have a Postgres database that stores our map data, and we connect a
datastore in Geoserver to point to the Postgres database. Then we add new
layers to Geoserver by choosing from the postgres datastore, and finally we
add these layers to a layergroup that our application can access via WMS).
Is the lagging caused by waiting for a connection from the connection pool,
and if it still doesn't get a connection after it reaches the 'time out'
value, it will give the "Cannot get a connection, pool error Timeout waiting
for idle object " error?

Thank you very much, appreciate your reply in advance!
E

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216771.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Thu, Jul 23, 2015 at 9:25 PM, eting123 <eting@anonymised.com> wrote:

We also have more questions:
1. We have been using the same settings (ie, max connections = 10) with
Geoserver 2.0.2. We have used that for several years and never had this
problem. This problem started happening when we switched to Geoserver
2.6.2.
Just wondering if this is caused by some change in the Geoserver code (for
example, it needs to hit the database more frequently...)?

This is a surprise to me, the performance tests we have handy show a steady
performance increase over the years (but I don't have data points for the
2.6.x series),
see slide 81 in this presentation:
http://www.slideshare.net/geosolutions/enterprise-gsgwcdeploymentbenchmarks-foss4g2015v0103

You sure nothing else changed between 2.0.2 and 2.6.2, like, the number of
layers,
the amount of requests you normally handle, the type of requests?

2. Sometimes we would observe that the map really lags as we navigate
around
(we have a Postgres database that stores our map data, and we connect a
datastore in Geoserver to point to the Postgres database. Then we add new
layers to Geoserver by choosing from the postgres datastore, and finally we
add these layers to a layergroup that our application can access via WMS).
Is the lagging caused by waiting for a connection from the connection pool,
and if it still doesn't get a connection after it reaches the 'time out'
value, it will give the "Cannot get a connection, pool error Timeout
waiting
for idle object " error?

It could be, or it could be that you have un-optimized styling, WFS requests
in parallel that are stealing away the database connection.... this is a
complex
system, there is no simple answer to such a generic question

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Ciao,
this document we wrote a while ago could help as well.

https://docs.google.com/document/d/1O02PeDRYKt2xLWG21k6BmcaRPzVRvXb4SQcrcZf4bHQ/edit?usp=sharing

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.

On Thu, Jul 23, 2015 at 7:54 PM, eting123 <eting@anonymised.com> wrote:

Thanks Andrea, I'll try that.

Would you also suggest that I modify the ‘Max connection idle time’ and/or
‘Evictor run periodically’? So that idle objects are cleaned up more
frequently?

Thanks
E

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216749.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

When we migrated from version 2.0.2 to 2.6.2:
1. We first downloaded the 2.6.2 war and put it into Tomcat 7
2. Then in Geoserver, we configured things from scratch again. We connected
a datastore to our Postgres 8.4 database, then added the layers one by one
as before.
3. We did not change the styling files though (could this relate to the
'un-optimized' styling that you mention? Styling created in 2.0.2 may need
to be re-created in 2.6.2?)
The number of layers is the same, and the number of requests we normally
handle are the same too. We basically just want Geoserver to serve a map
that we can send a WMS request to, we actually don't do anything else with
it.

One thing to mention is, the Tomcat also hosts another application. But
that's the same setup we have since the early days.

We have just increased max connections from 10 to 50, and we are monitoring
things to see if we get the same problem again.

Thank you very much for your attention to this,
E

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216951.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Thank you very much Simone, we will read this in details, looks like a very
informative document!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5216952.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Just want to follow up on this issue.

At the end we changed 'Support on the fly geometry simplification' from true
to false:
    <entry key="Support on the fly geometry simplification">true</entry>

and the problem didn't re-occur (monitored it for 2 months now). We figured
we don't really need this feature because our geometries are pretty simple.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-rendering-failed-on-connection-pool-error-tp5104815p5227478.html
Sent from the GeoServer - User mailing list archive at Nabble.com.