---------------------------------------------------------------- BEFORE YOU POST, search the faq at <http://java.apache.org/faq/> WHEN YOU POST, include all relevant version numbers, log files, and configuration files. Don't make us guess your problem!!! ---------------------------------------------------------------- Hello all, My configuration is: Sun Solaris 2.6 Apache 1.3.12 JServ 1.1.2 auto mode GNUJSP 1.0.1pre1 JDK1.2.2_05a native threads JVM with 64Mb heap and -verbose:gc We're trying to bring our web system into production on a somwehat busy server (some swapping, fairly high iowait). We're using JServ in manual mode because it's simple, and because of its ability to restart the JVM on failure. However, this is currently (at least partly) our problem, because the JServ wrapper appears to be prematurely terminating the JVM when its responses are slow. This happens with a frequency of anything from a couple of hours to a few minutes, probably depending upon load peaks. Here is one such restart as reported in the mod_jserv log: [01/08/2000 18:47:27:753] (INFO) wrapper: Java VM not responding (PID=29310) [timeout] [01/08/2000 18:47:28:857] (EMERGENCY) ajp12: ping: no reply (-1) Please make sure that the wrapper.classpath is pointing to the correct version of ApacheJServ.jar [01/08/2000 18:47:28:858] (INFO) wrapper: Java VM restarting (PID=29310) [01/08/2000 18:47:28:864] (INFO) wrapper: Java VM spawned (PID=17604, PPID=29310) Here is the detail of a garbage collection (error.log) which was happening at the time (note - precisely 10 seconds before the ping timeout) Starting GC at Tue Aug 1 18:47:17 2000; suspending threads. Gen[0](semi-spaces): size=4096kb(50% overhead), free=0kb, maxAlloc=0kb. space[0]: size=2048kb(100% overhead), free=0kb, maxAlloc=0kb. space[1]: size=2048kb, free=0kb, maxAlloc=0kb. Gen0(semi-spaces)-GC #1372 tenure-thresh=31semispaces csp0 : data = e5800000 : limit = e5a00000: reserve = e6000000 csp1 : data = e6000000 : limit = e6200000: reserve = e6800000 GNUJSP: Detected JSDK version 2.0 We believe that the problem is related to the VM garbage collection cycle, since we observe that all of our shutdowns occur at this time, and we can also manually cause a shutdown by doing enough activity to reduce the free heap by 10Mb and then calling the GC directly in our application. But only when the machine is busy. Here's the rub: 1. The GC cycle above was never completed - notice the csp0 / csp1 / GNUJSP messages that only happen on JVM startup. As a comparison, here is a normal GC: Starting GC at Tue Aug 1 19:15:39 2000; suspending threads. Gen[0](semi-spaces): size=4096kb(50% overhead), free=0kb, maxAlloc=0kb. space[0]: size=2048kb, free=0kb, maxAlloc=0kb. space[1]: size=2048kb(100% overhead), free=0kb, maxAlloc=0kb. Gen0(semi-spaces)-GC #1 tenure-thresh=31 2876ms 0%->87% free Gen[0](semi-spaces): size=4096kb(50% overhead), free=1787kb, maxAlloc=1787kb. space[0]: size=2048kb(100% overhead), free=0kb, maxAlloc=0kb. space[1]: size=2048kb, free=1787kb, maxAlloc=1787kb. GC[0] in 2964 ms: (64Mb, 96% free) -> (64Mb, 99% free) Total GC time: 2964 ms Processing 190 reference objects. ++ GC added 190 finalizers++ Pending finalizers = 190 ++ Finalizer Q = 0 2. What is the meaning of the "suspending threads" message during the GC!?!?? I was under the (perhaps mistaken) impression that the GC should run asynchronously. If the JVM is really suspending, then this could cause no end of problems. 3. The fact that the shutdown happened exactly 10 seconds after the GC start is highly suspicious. In http.conf we have: # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 and in jserv.properties # Default: 10 seconds ApJServVMTimeout 300 Despite this, it appears that in this particular case the JServ wrapper may be allowing only the default 10 seconds for the loaded JVM to respond, which it doesn't manage. The subject of JServ under load has been discussed on this list on a number of occasions, not always with a conclusive result. Most of the solutions involved increasing the ping timeout (which we've done) or switching to native threads (which we have by default) or increasing the number of available threads (which we've also done). It appears that what we are seeing is nothing to do with the above, but rather that we are experiencing an abnormally long GC when under load, which also blocks requests into the server, causing the JServ wrapper to force a restart. The restart occurs after 10 seconds rather than the VMTimeout amount. My questions are: 1. Can anybody confirm/deny (a) this timeout behaviour in Jserv and (b) the blocking/synchronous GC problem? 2. Is the best solution simply to move to a manual configuration in JServ and write our own monitoring script? This may seem rhetorical, but the machine on which we're running is operated by a third party, and getting this kind of stuff set up is a real hassle. In any case, I would really like to know the answers. Our webadmin is certainly stumped on this one. Geoff Lewis Finatec Financial Software Solutions AG Tel: +49 9371 97860 Fax: +49 9371 403381 Web: http://www.finatec.com Email: [EMAIL PROTECTED] -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search Archives: <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/> Problems?: [EMAIL PROTECTED]