[Geoserver-users] Tomcat hangs after a few minutes, stalls all socket connections

Hello,
This issue seems to be non geo-server specific, but since the main thing I am hosting with my Tomcat instance is Geoserver I figured I would give the list a shot.

I have the following:

  • MySQL database that holds exactly 1 item (name + coordinates)
  • GeoServer + datastore + featuretype to display my one little unit (which I have seen work). I display a KML file to Google Earth.
  • A java servlet which sits and waits for updated unit coordinates and then writes them to the database.

The server somehow pauses ever few minutes, does nothing for about 20 seconds, then continues along.

I have reproduced this issue doing any of the following

  • Hitting my java servlet repeatedly
  • Leaving Google earth refreshing my kml every 4 seconds.
  • Leaving Google earth refreshing a demo kml every 4 seconds (non db based datastore)

Since I am able to hang Tomcat using a datastore that is not database oriented, I do not believe it has anything to do with database pooling or my database connection.
I am able to cause this issue when not even calling GeoServer. This does not mean GeoServer isn’t doing something in the background.

CATELINA.OUT:

In catelina.out I see tons of “[Loaded com ]” but I do not see any exceptions. I checked fairly thoroughly.

The hang consistently occurs when loading the same classes:

[Loaded org.apache.coyote.ActionCode from file:/usr/local/jakarta/apache-tomcat-5.5.25/server/lib/tomcat-coyote.jar]
[Loaded sun.net.spi.DefaultProxySelector$3 from /usr/java/jdk1.6.0_14/jre/lib/rt.jar]
[Loaded org.apache.jk.common.ChannelSocket$SocketConnection from file:/usr/local/jakarta/apache-tomcat-5.5.25/server/lib/tomcat-ajp.jar]
----- HUGE HANG HERE ------
[Loaded java.io.ObjectOutputStream$BlockDataOutputStream from /usr/java/jdk1.6.0_14/jre/lib/rt.jar]
[Loaded java.io.ObjectOutputStream$HandleTable from /usr/java/jdk1.6.0_14/jre/lib/rt.jar]
[Loaded java.io.ObjectOutputStream$ReplaceTable from /usr/java/jdk1.6.0_14/jre/lib/rt.jar]

CATELINA.ERR:

11/07/2009 20:53:27 19905 jsvc.exec error: Shutdown or reload already scheduled
---- REPEAT ABOUT 30 TIMES -----
11/07/2009 20:53:27 19905 jsvc.exec error: Shutdown or reload already scheduled
11/07/2009 20:53:28 19904 jsvc.exec error: Service did not exit cleanly

TOMCAT.OUT:

INFO main org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1 on http-8080


So there is not a ton of information to go on.

Server Info:
Virtual Host, 64 bit
512 ram, 1024 burstable
GeoServer: 1.7.4
Java: 1.6.0_14-b08
Tomcat: 5.5.25
OS: Linux 2.6.18-028stab060.8
Average Memory Info: Free memory: 368.87 MB Total memory: 410.00 MB Max memory: 1011.25 MB

Startup params for Tomcat:
-Xms384M -Xmx1024M
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled

At this point I am very confused. I can not pinpoint the issue, but more disturbingly there appears to be no trace expressing that there even is an issue, there is just a big hang every few minutes.

Does anyone have any insight into this or could anyone let me know what other aspects of Tomcat should be configured?

What I may try doing is uninstalling GeoServer and seeing if I can reproduce this issue.

Thanks in advance,
Lucas