We figured it out, JMS was the problem but the cause were clients who were not closing connections properly. Our thread count has gone down to below 200 since we fixed our clients.
Can you please us know how you fixed the issue on client side?. We are also having issue.
You should call .close() for the following objects:
QueueSender, QueueSession, QueueConnection (same for Topic)
This should be done whitin a finally block to ensure it will be done in error cases!
With JBoss 5.1 I saw a WARNING like 'Looks client exit, cleanup connection' with this the behaviour is might avoided.
But the correct way is to close the connection by yourself.
Any changes required on server side?. I am using Jboss 5.0.1 and keep alive is set to -1 which means unlimited keep alive connections and also added
-Dhttp.maxConnections=200 options in run.conf. Does this have any affect on JMS?. Firewall is present between client and server.
No, no changes, I run the standard 5.1 (but EAP version).
You can check it easy, open a connection to JMS and send/receive a message and exit the program without closing the connection.
A few seconds later you will see the WARNING within the server.log
The http.* parameter have no influence to JMS.
I am asking all this as active thread count is creeping up daily. It hovers around 200 with initial start up climbs 270 - 290 within couple of hours, moves into 300 by next day and by the end of week it lands in 700's. At this point of time server is running OOM and I need to restart to bring the threads to zero. Any idea what might be causing this issue?. I am not sending any details as i don't know what is required for you.
Do you force a thread/heap dump and analyse what the threads are doing?
Is there a possibility that you app hung. I check this via a log for entry and exit with the thread-id in the log, so I'm able to see that an app-thread will hung up.
Ok. I will try do it and update the thread.
Thanks for your help.
Forgot to mention. I have also made a change jboss-as/server/<config>/conf jboss-service.xml file. I have chaged the pool size to 500. By default it was 10. Does this have any affect in my case. If you can please let us know, what this attribute will exactly do.
<!-- The max number of threads in the pool -->
Really appreciate your help here.
Pleas can somebody let me know what this attribute mean?
I think these are threads used by JBoss for JNDI, etc.
Usually the default values work fine, but anyway, in JBoss 4.2 if you check attribute "QueueSize" in the jmx console (jboss.system -> ThreadPool) :
and see large value, you might want to increase set the pool size from 10 to a larger value.
Looks like port 8080 is not being forwarded. I am unable to open the link in the above post.
You would have to replace 'localhost' with the IP of the machine where JBoss is running and '8080' with the port on which JBoss is listening to HTTP requests.