[jcifs] Max number of threads reached

cesar at clazaro1.jazztel.es cesar at clazaro1.jazztel.es
Mon Sep 10 13:01:29 GMT 2007


Thanks for the information. I just reduced the value of the property
jcifs.smb.client.soTimeout, so that all idle connections should be released in 1
second. But it doesn't solve the problem as I still reach the max number of
available threads. The code is very simple, as it just either reads all the URLs
a directory contains or gets back a simple file.

Regards, Cesar.

On Sun, 09 Sep 2007 13:48:12 +0200
Felix Schumacher <felix.schumacher at internetallee.de> wrote:

> Am Sonntag, den 09.09.2007, 11:52 +0200 schrieb
> cesar at clazaro1.jazztel.es:
> > Hi there,
> >
> > executing a web application on Tomcat that is using JCIFS libraries I got an
> > error message saying that the maximun number of threads in Tomcat has been
> > reached and can not then open more SMB connections. It always happens when the
> > application has been running for a while and it's trying to open new SMB
> > connections.
> Try to get a stacktrace. If you are running the tomcat under unix you
> can try to send a SIGQUIT with kill -QUIT $PID_OF_TOMCAT. The stacktrace
> will tell you, what the threads are waiting for.

That's not a stack trace, thats what you call a thread dump.

But yes, it would be helpful to see where all the threads are waiting.

> > It seems the SMB connections are not released properly in my code although I'm
> > using the same code that is in the examples. When is a SMB connection going to
> > be closed?.

JCIFS closes transport threads after they have been idle for
jcifs.smb.client.soTimeout milliseconds.

> > Is there any way to force to close those connections?. BTW, I'm
> > using kerberos authN.

No. Connections should automatically close after being idle for 35
seconds.

Unless the operator has changed some JCIFS properties that affect
transport behavior.

Mike

-- 
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.com/




More information about the jcifs mailing list