2 Replies Latest reply on Jul 21, 2005 6:06 AM by Vishal Chaddha

    Jbossweb threads

    Laurence Smith Newbie

      We are running JBoss-3.2.3 with integrated Jetty (win2000 server and jdk 1.4.1_02) and have been experiencing intermittent problems with Jetty and its thread management. At seemingly arbritrary times Jetty runs out of threads and brings down the server with it. After a reboot it is fine.

      The error message is:

      2004-03-06 11:14:49,734 INFO [org.jboss.jbossweb] LOW ON THREADS: SocketListener@0.0.0.0:80
      2004-03-06 11:14:49,765 WARN [org.jboss.jbossweb] WARNING: OUT OF THREADS: SocketListener@0.0.0.0:80
      etc...

      The config for Jetty is fairly standard, the relevent settings are:

      MinThreads = 10
      MaxThreads=100
      MaxIdleTimeMs=30000
      LowResourcePersistTimeMs=5000


      I dont believe this to be a result of high load as I doubt the number of concurrent users exceeded 10. There is no code to create threads in the application code either, so I think it is unlikely it is an application error. This has happened twice now since upgrading. I have tested this on our development machine and although I could replicate the thread pool being exhausted - it recovered (like it should:). Has anybody else experienced this type of failure?

      Does anyone have any suggestions. I know I could increase the number of threads but I am not sure that this will solve the problem. I am completely at a loss?

        • 1. Re: Jbossweb threads
          Andrew May Newbie

          When Jetty runs out of threads you should do a Thread Dump on the JVM to see what your threads are doing.

          It's quite possible that some of your threads are deadlocked in your application or database and are sat waiting for something.

          This sometimes happens to us when we have database problems - we use 250 threads and when there's a database deadlock you can see most of them stuck on a socketRead to the database.

          Hope that helps,

          Andrew

          • 2. Re: Jbossweb threads
            Vishal Chaddha Newbie

            Smith,
            I am facing the same problem as faced by you in Dec 2001.

            We are facing the same problem and need some insight on how you got out of the situation.

            Please help me out as soon as possible.