[Geoserver-devel] Styles dropping out

Hi,

I don't have enough to file a bug report, but I was wondering whether any of you have experienced this. A GeoWebCache user has defined a layergroup and tried to seed his cache, but he gets tiles like these:
http://atlas.openplans.org/~ak/geowebcache_1.jpeg

when it should look like this:
http://atlas.openplans.org/~ak/geowebcache_2.jpeg

I don't think GWC could do this, since the top left part of the picture contains grey and white roads that should have been overwritten by the yellow roads. The problem appears to move around, if he reseeds it doesn't have to show up in the same place.

The hammer is that I think saw the same problem on our annotation demo in December, which was using TileCache at the time. We weren't able to dig up enough information for a proper bug report, and it didn't look like a serious problem at the time. I've asked Paul to check the logs, but havent heard anything yet.

Does anyone have a clue about what could cause this?

-Arne

Arne Kepp ha scritto:

Hi,

I don't have enough to file a bug report, but I was wondering whether any of you have experienced this. A GeoWebCache user has defined a layergroup and tried to seed his cache, but he gets tiles like these:
http://atlas.openplans.org/~ak/geowebcache_1.jpeg

when it should look like this:
http://atlas.openplans.org/~ak/geowebcache_2.jpeg

I don't think GWC could do this, since the top left part of the picture contains grey and white roads that should have been overwritten by the yellow roads. The problem appears to move around, if he reseeds it doesn't have to show up in the same place.

The hammer is that I think saw the same problem on our annotation demo in December, which was using TileCache at the time. We weren't able to dig up enough information for a proper bug report, and it didn't look like a serious problem at the time. I've asked Paul to check the logs, but havent heard anything yet.

Does anyone have a clue about what could cause this?

Unfortunately no, I don't have any clue, but I've seen this issue
myself in the same annotation demo. Unfortunately I have no faintest
idea of what could cause it, thought it seems to be "load" related,
like maybe GeoServer did not have enough memory to reserve the back
buffers for some of the layers involved in the rendering?
uDig guys made the renderer very very lenient, it tries to do a
best effort rendering, so unless you don't enable very fine logging
errors are not logger either...

Cheers
Andrea

All,

I was just now able to recreate this under TileCache and plain old WMS.
And here is an excerpt from the log file.
27 May 16:18:06 INFO [geoserver.filters] - 0:0:0:0:0:0:0:1 "GET
/geoserver/wfs?LAYERS=layer-group_map&UNITS=m&PROJECTION=EPSG%3A900913&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-13625496,4550133,-13625240,4550389&WIDTH=256&HEIGHT=256"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404
Firefox/2.0.0.14" "http://localhost/sfmaps/index_wms.shtml"
27 May 16:18:07 ERROR [data.jdbc] - Error Performing SQL query: SELECT
encode(asBinary(force_2d("the_geom"),'XDR'),'base64') FROM
"public"."v_citylots" WHERE "the_geom" && GeometryFromText('POLYGON
((6012714.389055056 2116530.1922483128, 6012714.389055056
2117210.5217092447, 6013397.467590438 2117210.5217092447, 6013397.467590438
2116530.1922483128, 6012714.389055056 2116530.1922483128))', 102643)
org.postgresql.util.PSQLException: An I/O error occured while sending to the
backend.
  at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:239)
  at
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
  at
org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:910)
  at
org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:627)
  at
org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:82)
  at
org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:241)
  at
org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:211)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1583)
  at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:649)
  at
org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1443)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1313)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:262)
  at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:310)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:436)
  at
org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:616)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  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.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:69)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  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:274)
  at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  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:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
  at java.net.SocketInputStream.read(Unknown Source)
  at java.io.BufferedInputStream.fill(Unknown Source)
  at java.io.BufferedInputStream.read(Unknown Source)
  at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:256)
  at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1163)
  at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
  ... 64 more

ENV is:
java 1.6.0_05
geoserver 1.6.3

Paul
--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17502237.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

I just restarted tomcat/geoserver.
The server started properly and rendered the first images properly.
I was very quickly able to reproduce the error.
See log below.

Here is the log file output.
27 May 16:27:04 INFO [geoserver.filters] - 0:0:0:0:0:0:0:1 "GET
/geoserver/wfs?LAYERS=layer-group_map&UNITS=m&PROJECTION=EPSG%3A900913&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-13626776,4548597,-13626520,4548853&WIDTH=256&HEIGHT=256"
took 1406ms
27 May 16:27:04 INFO [geoserver.filters] - 0:0:0:0:0:0:0:1 "GET
/geoserver/wfs?LAYERS=layer-group_map&UNITS=m&PROJECTION=EPSG%3A900913&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-13626008,4548597,-13625752,4548853&WIDTH=256&HEIGHT=256"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404
Firefox/2.0.0.14" "http://localhost/sfmaps/index_wms.shtml"
27 May 16:27:06 ERROR [data.jdbc] - Error Performing SQL query: SELECT
"name", "kph", encode(asBinary(force_2d("the_geom"),'XDR'),'base64') FROM
"public"."v_roads_1" WHERE "the_geom" && GeometryFromText('POLYGON
((6010643.042076916 2112603.5431776727, 6010643.042076916
2113278.7450600504, 6011320.972715976 2113278.7450600504, 6011320.972715976
2112603.5431776727, 6010643.042076916 2112603.5431776727))', 102643)
org.postgresql.util.PSQLException: An I/O error occured while sending to the
backend.
  at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:239)
  at
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
  at
org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:910)
  at
org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:627)
  at
org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:82)
  at
org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:241)
  at
org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:211)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1583)
  at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:649)
  at
org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1443)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1313)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:262)
  at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:310)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:436)
  at
org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:616)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  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.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:69)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  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:274)
  at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  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:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
  at java.net.SocketInputStream.read(Unknown Source)
  at java.io.BufferedInputStream.fill(Unknown Source)
  at java.io.BufferedInputStream.read(Unknown Source)
  at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:256)
  at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1163)
  at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
  ... 64 more
27 May 16:27:06 ERROR [geotools.rendering] - Could not aquire
feature:org.geotools.data.DataSourceException: Error Performing SQL query:
SELECT "name", "kph", encode(asBinary(force_2d("the_geom"),'XDR'),'base64')
FROM "public"."v_roads_1" WHERE "the_geom" && GeometryFromText('POLYGON
((6010643.042076916 2112603.5431776727, 6010643.042076916
2113278.7450600504, 6011320.972715976 2113278.7450600504, 6011320.972715976
2112603.5431776727, 6010643.042076916 2112603.5431776727))', 102643)
java.util.NoSuchElementException: Could not aquire
feature:org.geotools.data.DataSourceException: Error Performing SQL query:
SELECT "name", "kph", encode(asBinary(force_2d("the_geom"),'XDR'),'base64')
FROM "public"."v_roads_1" WHERE "the_geom" && GeometryFromText('POLYGON
((6010643.042076916 2112603.5431776727, 6010643.042076916
2113278.7450600504, 6011320.972715976 2113278.7450600504, 6011320.972715976
2112603.5431776727, 6010643.042076916 2112603.5431776727))', 102643)
  at
org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:53)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1597)
  at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:649)
  at
org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1443)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1313)
  at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:262)
  at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:310)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:436)
  at
org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:616)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  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.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:69)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  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:274)
  at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  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:235)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Unknown Source)
Caused by: org.geotools.data.DataSourceException: Error Performing SQL
query: SELECT "name", "kph",
encode(asBinary(force_2d("the_geom"),'XDR'),'base64') FROM
"public"."v_roads_1" WHERE "the_geom" && GeometryFromText('POLYGON
((6010643.042076916 2112603.5431776727, 6010643.042076916
2113278.7450600504, 6011320.972715976 2113278.7450600504, 6011320.972715976
2112603.5431776727, 6010643.042076916 2112603.5431776727))', 102643)
  at
org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:921)
  at
org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:627)
  at
org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:82)
  at
org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:241)
  at
org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:211)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1583)
  ... 54 more

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17502417.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

To me that looks like the database server disappeared.

Is postgresql running on the same machine? Can you see whether it has a log with errors?

-Arne

Paul McCullough wrote:

I just restarted tomcat/geoserver.
The server started properly and rendered the first images properly.
I was very quickly able to reproduce the error.
See log below.

snip....

org.postgresql.util.PSQLException: An I/O error occured while sending to the
backend.
  at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
  at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)

  ... 54 more

... snip
  

Arne Kepp ha scritto:

To me that looks like the database server disappeared.

Is postgresql running on the same machine? Can you see whether it has a log with errors?

This mail thread:
http://www.nabble.com/org.postgresql.util.PSQLException:-An-I-O-error-occured-while-sending-to-the-backend-td17096005.html

suggests some logging options that can be used to diagnose the problem.
In that thread case it seems the connection was being closed before
the sql statement was sent to the server. It may be we have the same
problem, but I'd like to know for sure.
Is TileCache doing any kind of parallel seeding, that is, sending
multiple requests in parallel?

Cheers
Andrea

Andrea Aime wrote:

Arne Kepp ha scritto:

To me that looks like the database server disappeared.

Is postgresql running on the same machine? Can you see whether it has a log with errors?

This mail thread:
http://www.nabble.com/org.postgresql.util.PSQLException:-An-I-O-error-occured-while-sending-to-the-backend-td17096005.html

suggests some logging options that can be used to diagnose the problem.
In that thread case it seems the connection was being closed before
the sql statement was sent to the server. It may be we have the same
problem, but I'd like to know for sure.
Is TileCache doing any kind of parallel seeding, that is, sending
multiple requests in parallel?

By default both GWC and TileCache have single threaded seeders, but it's common to start multiple seeders in parallel. Paul?

-Arne

All,

It is clear that the problem is not related to TileCache and GeoWebCache.
I have removed cahcing from the picture.
As Arne suspected, there are issues with the database connection to
postgresql.
So I have added some debugging to postgresQL as suggested above.
Attached are zipped log files from geoserver and from postgresql.
(Not sure if nabble allows zips - here goes...)

http://www.nabble.com/file/p17521585/post_17513128.zip post_17513128.zip

Thanks
Paul

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17521585.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

I neglected to mention that the previously included log files were created as
follows in order to show the minimum necessary...
1) stop tomcat and postgresql
2) remove all logs files for tomcat and postgresql
3) start postgresql
4) start tomcat
5) pan and zoom until I see the bad images (it took only 3 or 4 pans and or
zooms)
6) stop tomcat and postgresql
7) copy and zip the new logfiles

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17522299.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

So panning would make the requests multithreaded.

I saw this in your logs: 2008-05-28 14:02:11 LOG: server process (PID 3172) exited with exit code -1073741502

That's not very helpful, but it seems to be this bug: http://archives.postgresql.org/pgsql-bugs/2007-11/msg00138.php

Unfortunately I can't find any follow ups on this, so I'm not sure whether it has been resolved or not. A shot in the dark would be to upgrade to 8.3, but I'm pretty sure this is not a GeoServer problem (no request should be able to cause an unclean shutdown).

-Arne

Paul McCullough wrote:

I neglected to mention that the previously included log files were created as
follows in order to show the minimum necessary...
1) stop tomcat and postgresql
2) remove all logs files for tomcat and postgresql
3) start postgresql
4) start tomcat
5) pan and zoom until I see the bad images (it took only 3 or 4 pans and or
zooms)
6) stop tomcat and postgresql
7) copy and zip the new logfiles

I am now studying the logs.
I suspect the problem starts on this line of the pgsql log:
    2008-05-28 14:00:50 LOG: server process (PID 5592) exited with exit
code -1073741502
Indeed it appears to be a pqsql bug....
    http://archives.postgresql.org/pgsql-bugs/2006-12/msg00166.php
I shall patch pqsql and post results.

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17522803.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Recap
-----
I have a layer group.
Sometimes, when it is rendered via WMS, some (openlayers) tiles are missing
some of the styles.
See image attached to this thread.

Explanation
-----------
summary: don't let geoserver ask for too many database connections - set
"max connections" parameter to a relatively low number.

disclaimer: I am not a real DBA or sys admin - but I have to wear those
hats.

Details:
I had a layer group specified in geoserver - 16 layers....
  <BaseMapGroup baseMapTitle = "layer-group_map" >
   
<baseMapLayers>postgis:bayarea_general,postgis:parks,postgis:waterbodies,postgis:v_citylots,postgis:v_roads_0,postgis:v_roads_1,postgis:v_roads_2,postgis:v_roads_0,postgis:v_roads_1,postgis:v_roads_2,postgis:v_roads_2,postgis:v_roads_1,postgis:v_roads_0,postgis:v_roads_3,postgis:v_roads_3,postgis:v_roads_3</baseMapLayers>
   
<baseMapStyles>900913_map_bayarea_general,900913_map_parks,900913_map_waterbodies,900913_map_citylots,900913_map_roads_0_outer,900913_map_roads_1_outer,900913_map_roads_2_outer,900913_map_roads_0_inner,900913_map_roads_1_inner,900913_map_roads_2_inner,900913_map_roads_2_label,900913_map_roads_1_label,900913_map_roads_0_label,900913_map_roads_3_outer,900913_map_roads_3_inner,900913_map_roads_3_label</baseMapStyles>
    <baseMapEnvelope srsName = "EPSG:900913" >
      <pos>-1.3892984E7 4350270.99999996</pos>
      <pos>-1.3410216E7 4804494.999999971</pos>
    </baseMapEnvelope>
  </BaseMapGroup>
A little crazy - yes - but I did it this way to help reduce the complexity
of the SLDs.
(looking forward to using the SLD tools that OpenGeo.org)

When I set up the postgis layers I accepted the defaults (relevant elements
only):
    <datastore id = "roads_2" enabled = "true" namespace = "postgis" >
      <connectionParams >
        <parameter name = "validate connections" value = "false" />
        <parameter name = "max connections" value = "10" />
        <parameter name = "min connections" value = "4" />
      </connectionParams>
    </datastore>

And when I installed postgresQL I took the deafults provided in
postgresql.conf for max connections
- max_connections = 100 # (change requires restart)

So the particluar combination of
- layer-group specification
- layer connection pool specification
- postgresQL max connections specification
results in geoserver asking for more postgresql connections than my little
dev box could support.

The messages I was getting in the postgresQL log files did not make this
clear - due to my lack of expertise as a DBA I am sure.
Version 8.2 log output for example said something like:
    2008-05-28 14:00:50 LOG: server process (PID 5592) exited with exit
code -1073741502
and then postgres restarts itself.
Version 8.3 provides an exit code that maps to something like "could not
load dll".
Then the 8.3 dataserver would actually stop (crash).

How to Fix It
-------------
Obviously, it is unacceptable to the dataserver to go down - so first I
lowered the postgresql.conf max connections
- max_connections = 50
What number you use depends on a number of factors - plenty of material
about this on the web.

This alone prevents postgresql from crashing - a very good thing.

However, if this is all you do, geoserver will still drops styles in the
layer-group rendering.

From the geoserver log:

    13 Jun 10:40:07 ERROR [geotools.rendering] - Could not aquire
feature:org.geotools.data.DataSourceException: Connection
failed:org.postgresql.util.PSQLException: FATAL: sorry, too many clients
already
Validating connections does not help here.

Bottom line is that I needed to reduce the number of connections per layer:
e.g.
    <datastore id = "roads_2" enabled = "true" namespace = "postgis" >
      <connectionParams >
        <parameter name = "validate connections" value = "false" />
        <parameter name = "max connections" value = "2" />
        <parameter name = "min connections" value = "1" />
      </connectionParams>
    </datastore>
RE:
   
http://geoserver.org/display/GEOSDOC/Connection+pooling+options+(for+DBMS+based+datastores)
    
So I'll conjecture that if I have a layer group with 16 layers (as defined
above) with the pool specs (just above),
calls to that layer group may results in as many as 32 database connections.
Perhaps a geoserver developer could confirm this?
In any case, the configuration resolves all of my problems and does not
appear to impact performance in my dev env.

My QA and PROD configs will be slightly more generous because I have more
resources there.
It also worth noting that for my use case, we use WMS to seed our tilecache.
Therefore, I care more about the integrity of the rendered map tiles than I
care about performance.

Database versions had no bearing on this problem - although I did see
different db log messages between 8.2 and 8.3.

Key words / phrases
-------------------
postgresql
postgis
database connection
connection pool
geoserver
styles
rendering

Regards,
Paul

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17831310.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Paul McCullough wrote:
...

How to Fix It
-------------
Obviously, it is unacceptable to the dataserver to go down - so first I
lowered the postgresql.conf max connections
- max_connections = 50
What number you use depends on a number of factors - plenty of material
about this on the web.

This alone prevents postgresql from crashing - a very good thing.

However, if this is all you do, geoserver will still drops styles in the
layer-group rendering.

From the geoserver log:

    13 Jun 10:40:07 ERROR [geotools.rendering] - Could not aquire
feature:org.geotools.data.DataSourceException: Connection
failed:org.postgresql.util.PSQLException: FATAL: sorry, too many clients
already
Validating connections does not help here.

Bottom line is that I needed to reduce the number of connections per layer:
e.g.
    <datastore id = "roads_2" enabled = "true" namespace = "postgis" >
      <connectionParams >
        <parameter name = "validate connections" value = "false" />
        <parameter name = "max connections" value = "2" />
        <parameter name = "min connections" value = "1" />
      </connectionParams>
    </datastore>
RE:
   http://geoserver.org/display/GEOSDOC/Connection+pooling+options+(for+DBMS+based+datastores)

This is odd... the connection pool parameters are not per layer, but
per datastore, so if all of those layers are in the same datastores,
you won't be able to use more than 2 connections total like this (unless
there is a very nasty bug going around)... unless... did you configure a
separate datastore for each of those layers???

Cheers
Andrea

... unless... did you configure a
separate datastore for each of those layers???

DOH!
That is exactly what I had done.
I have fixed this in the config files and have increased datastore
connection parms back up to 10 or 20.
All is well now.
I should know better.
Thanks for the reply.

--
View this message in context: http://www.nabble.com/Styles-dropping-out-tp17471813p17986263.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.