Hi Gabriel,
thanks for this detailed report, it makes sense now.
Is backporting the only option?
Is there no Geoserver branch which is compliant with Geotools trunk?
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Gabriel Roldán <groldan@anonymised.com>
Naar: Bart van den Eijnden OSGIS <bartvde@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net, Saul Farber
<Saul.Farber@anonymised.com>
Onderwerp: Re: [Geoserver-users] ArcSDE connection pooling issues
Datum: 20/02/08 14:06
Hi Bart,
ok, now it makes more sense, unfortunately.
GeoServer 1.6.x uses GeoTools 2.4.x, and arcsde transactions support in
2.4.x
is just horrible, and certainly may be doing any sort of weird things.
On the bright side, a couple months ago the GeoTools ArcSDE plugin was
almost
rewritten from scratch to cope up with propper transaction support, using
arcsde native transactions, and I have fresh news of it working perfectly
to
edit stuff through uDig from the guys that funded that effort.
So arcsde for geotools trunk is much much better, an actually the first
one
that deserves being mentioned as supporting transactions. Some of the more
important improvements made during that rewrite encompasses transaction
support through native arcsde transactions, improved connection pool
handling
and thread safety. The last one is important as ArcSDE connections are not
thread safe, so concurrent access shall be handled at the client code, and
is
the reason why you get those "DATABASE LEVEL ERROR OCCURRED"
errors.
We stressed it a lot as uDig makes heavy concurrent access using
transactions.
Whether the shiny new stuff in trunk could be back ported to 2.4 was asked
before, and I'd say it should be pretty trivial except that the new arcsde
datastore makes use of Java's 5 ReentrantLock to handle concurrency. Yet,
I
guess EDU.oswego.cs.dl.util.concurrent.ReentrantLock could be used instead
for Java 1.4 compatibility. So, backporting it would be a matter of two to
three working days.
Cheers,
Gabriel
On Wednesday 20 February 2008 04:49:03 pm Bart van den Eijnden (OSGIS)
wrote:
> Hi Gabriel,
>
> the OL layers are WFS layers, so Untiled. There are only 3 layers
(one for
> points, polygons and lines) in the application, and using OpenLayers
> (Layer.WFS) new features are added.
>
> So we don't use WMS, only WFS in this case.
>
> I have the default value for the connection timeout, I'll try
increasing
> it.
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
> --------- Oorspronkelijk bericht --------
> Van: Gabriel Roldán <groldan@anonymised.com>
> Naar: geoserver-users@lists.sourceforge.net
> <geoserver-users@lists.sourceforge.net>, Bart van den Eijnden
OSGIS
> <bartvde@anonymised.com>
> Cc: Saul Farber <Saul.Farber@anonymised.com>
> Onderwerp: Re: [Geoserver-users] ArcSDE connection pooling issues
> Datum: 20/02/08 13:41
>
> > 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:
>
>
&lt;http://giswebservices.massgis.state.ma.us/geoserver/wms?service=WMS&amp
>;request=GetCapabilities&gt;
>
> > On Wednesday 20 February 2008 02:20:39 pm Bart van den Eijnden
(OSGIS)
>
> wrote:
> > &gt; Hi list,
> > &gt;
> > &gt; we are running into connection pooling issues (using
1.6RC2), we now
>
> have
>
> > &gt; even increased the maximum number up to 25 (coming from
8), but
> > still &gt; Geoserver runs out of connections after a while.
There is only
> > 1
>
> client
>
> > &gt; (OpenLayers based) active!
> > &gt;
> > &gt; What could be the issue?
> > &gt;
> > &gt; Caused by: java.util.NoSuchElementException: Could not
aquire
> > &gt; feature:org.geotools.data.DataSourceException: The
maximun of 25 to
> > &gt;
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
> > &gt; server=geodatabase.ad.rws.nl, port=5151, instance=null,
user=DID,
> > &gt; password=*****, minConnections=2, maxConnections=25,
>
> connTimeOut=1000] has
>
> > &gt; been reached
> > &gt;
> > &gt; 2008-02-20 11:17:03,298 WARN
> > &gt; [org.geotools.arcsde.pool.ArcSDEConnectionPool] - Out
of
> > connections: &gt; Timeout waiting for idle object
> > &gt; java.util.NoSuchElementException: Timeout waiting for
idle object
> > &gt; at
> > &gt;
>
>
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPo
>
> > &gt;ol.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectio
>
> > &gt;nPool.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataS
>
> > &gt;tore.java:963) at
> > &gt;
>
>
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.jav
>
> > &gt;a:249) at
> > &gt;
>
>
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatur
>
> > &gt;eStore.java:76) at
> > &gt;
>
>
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:16
>
> > &gt;4) at
org.geoserver.wfs.Transaction.execute(Transaction.java:328) at
> > &gt;
org.geoserver.wfs.Transaction.transaction(Transaction.java:104) at
> > &gt;
>
>
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureSer
>
> > &gt;vice.java:156) at
>
> sun.reflect.GeneratedMethodAccessor203.invoke(Unknown
>
> > &gt; Source) at
> > &gt;
>
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> > &gt;l.java(Compiled Code))
> > &gt; at
java.lang.reflect.Method.invoke(Method.java(Compiled
>
> Code))
>
> > &gt; at
> > &gt;
>
>
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop
>
> > &gt;Utils.java:292) at
> > &gt;
>
>
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoin
>
> > &gt;t(ReflectiveMethodInvocation.java:155) at
> > &gt;
>
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec
>
> > &gt;tiveMethodInvocation.java:122) at
> > &gt; org.geoserver.wfs.WFSLogger.invoke(WFSLogger.java:44)
> > &gt; at
> > &gt;
>
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec
>
> > &gt;tiveMethodInvocation.java:144) at
> > &gt;
>
>
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr
>
> > &gt;oxy.java:174) at $Proxy0.transaction(Unknown Source)
> > &gt; at
sun.reflect.GeneratedMethodAccessor306.invoke(Unknown
>
> Source)
>
> > &gt; at
> > &gt;
>
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>
> > &gt;l.java(Compiled Code))
> > &gt; at
java.lang.reflect.Method.invoke(Method.java(Compiled
>
> Code))
>
> > &gt; at
> > &gt;
>
>
org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurit
>
> > &gt;yInterceptor.java:41) at
> > &gt;
org.geoserver.ows.Dispatcher.execute(Dispatcher.java:495) at
> > &gt;
>
>
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:188)
>
> > &gt; at
> > &gt;
>
>
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstra
>
> > &gt;ctController.java:139) at
> > &gt;
>
>
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(S
>
> > &gt;impleControllerHandlerAdapter.java:44) at
> > &gt;
>
>
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ
>
> > &gt;let.java:684) at
> > &gt;
>
>
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl
>
> > &gt;et.java:625) at
> > &gt;
>
>
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe
>
> > &gt;rvlet.java:392) at
> > &gt;
>
>
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.ja
>
> > &gt;va:357) at
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
>
> > &gt;
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
>
> Code))
>
> > &gt; at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>
> > &gt;nFilterChain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>
> > &gt;hain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacter
>
> > &gt;EncodingFilter.java:108) at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>
> > &gt;nFilterChain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>
> > &gt;hain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecu
>
> > &gt;rityInterceptor.java:107) at
> > &gt;
>
>
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSe
>
> > &gt;curityInterceptor.java:72) at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslati
>
> > &gt;onFilter.java:110) at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(An
>
> > &gt;onymousProcessingFilter.java:125) at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessi
>
> > &gt;ngFilter.java:178) at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(Http
>
> > &gt;SessionContextIntegrationFilter.java:229) at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterC
>
> > &gt;hainProxy.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
>
> > &gt; at
> > &gt;
>
>
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98
>
> > &gt;) at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>
> > &gt;nFilterChain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
>
> > &gt;hain.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
>
> > &gt;ava:213) at
> > &gt;
>
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
>
> > &gt;ava:178) at
> > &gt;
>
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
>
> > &gt;6) at
> > &gt;
>
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10
>
> > &gt;5) at
> > &gt;
>
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
>
> > &gt;a:107) at
> > &gt;
>
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
>
> > &gt; at
> > &gt;
>
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>
> > &gt; at
> > &gt;
>
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>
> > &gt; at
> > &gt;
>
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
>
> > &gt;ection(Http11Protocol.java:744) at
> > &gt;
>
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja
>
> > &gt;va:527) at
> > &gt;
>
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW
>
> > &gt;orkerThread.java:80) at
> > &gt;
>
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
>
> > &gt;va:684) at java.lang.Thread.run(Thread.java:568)
> > &gt; Caused by:
>
> org.geotools.arcsde.pool.UnavailableArcSDEConnectionException:
> > &gt; The maximun of 8 to
> > &gt;
org.geotools.arcsde.pool.ArcSDEConnectionConfig[dbtype=arcsde,
> > &gt; server=geodatabase.ad.rws.nl, port=5151, instance=null,
user=DID,
> > &gt; password=*****, minConnections=2, maxConnections=8,
> > connTimeOut=1000]
>
> has
>
> > &gt; been reached
> > &gt; at
> > &gt;
>
>
org.geotools.arcsde.pool.ArcSDEConnectionPool.getConnection(ArcSDEConnectio
>
> > &gt;nPool.java(Compiled Code))
> > &gt; at
> > &gt;
>
>
org.geotools.arcsde.data.ArcSDEDataStore.getFeatureWriterAppend(ArcSDEDataS
>
> > &gt;tore.java:963) at
> > &gt;
>
>
org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.jav
>
> > &gt;a:249) at
> > &gt;
>
>
org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatur
>
> > &gt;eStore.java:76) at
> > &gt;
>
>
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:16
>
> > &gt;4) ... 61 more
> > &gt; 2008-02-20 11:17:03,301 DEBUG
> > &gt; [org.geotools.arcsde.pool.ArcSDEConnectionPool] -
Connection
>
> validated,
>
> > &gt; returned user DID
> > &gt; 2008-02-20 11:17:03,301 INFO [org.geoserver.wfs] -
> > &gt; Request: transaction
> > &gt; handle = null
> > &gt; service = WFS
> > &gt; version = 1.0.0
> > &gt; baseUrl = http://145.50.148.45:8082/geoserver/
> > &gt; lockId = null
> > &gt; group =
> > &gt;
>
>
[net.opengis.wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com
>
> > &gt; (feature: [Feature[ id=fid-121efd4e_11831468923_-7fa3 ,
> > OBJECTID=null
>
> ,
>
> > &gt; TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON
(((135439.96200400835
> > &gt; 421159.9247387089, 155040.01315245865
422279.9276614775,
>
> 148319.99561584712
>
> > &gt; 400439.87066749, 135439.96200400835
421159.9247387089))) ]], handle:
>
> null,
>
> > &gt; idgen: &lt;unset&gt;, inputFormat:
&lt;unset&gt;, srsName: null)]
> > &gt; insert =
> > [net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com &gt;
(feature:
> > [Feature[ id=fid-121efd4e_11831468923_-7fa3 , OBJECTID=null
>
> ,
>
> > &gt; TITEL=null , DATUM=null , SHAPE=MULTIPOLYGON
(((135439.96200400835
> > &gt; 421159.9247387089, 155040.01315245865
422279.9276614775,
>
> 148319.99561584712
>
> > &gt; 400439.87066749, 135439.96200400835
421159.9247387089))) ]], handle:
>
> null,
>
> > &gt; idgen: &lt;unset&gt;, inputFormat:
&lt;unset&gt;, srsName: null)]
> > &gt; update =
> > &gt; delete =
> > &gt; native =
> > &gt; releaseAction = ALL
> > &gt;
> > &gt; TIA.
> > &gt;
> > &gt; Best regards,
> > &gt; Bart
> > &gt;
> > &gt; --
> > &gt; Bart van den Eijnden
> > &gt; OSGIS, Open Source GIS
> > &gt; http://www.osgis.nl
> > &gt;
> > &gt;
> > &gt;
> > &gt;
> > &gt;
> > &gt;
> > &gt;
>
>
-------------------------------------------------------------------------
>
> > &gt; This SF.net email is sponsored by: Microsoft
> > &gt; Defy all challenges. Microsoft(R) Visual Studio 2008.
> > &gt; http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > &gt; _______________________________________________
> > &gt; Geoserver-users mailing list
> > &gt; Geoserver-users@lists.sourceforge.net
> > &gt;
https://lists.sourceforge.net/lists/listinfo/geoserver-users
> > &gt;
> > &gt;
>
> !DSPAM:4045,47bc4c14214155219720167!