On 19 May 2010 13:26,  <tom...@habmalnefrage.de> wrote:
> java.lang.OutOfMemoryError: unable to create new native thread

OK, so one possibility is that the Windows thread table is full.

>   - maxThreads for HTTP: 450
>   - maxThreads for jk: 3000

That's a huge number of threads for one process.

>   - MaxThreads for HTTP: 800
>   - MaxThreads for jk: 450

That's merely massive.

>   - all connections shown by netstat -an (not filtered): 4595
>   - connections in state close_wait: 3152

That has nothing to do with threads.

> On the other hand: Shouldn't  windows start to swap if the ram is full?

Yes.  But that's not the error you're getting.

> In which memory-area does windows handle the memory which is used for the 
> threads? Is it shown in the taskmanager?

Task manager, Processes tab, View, Select Columns..., tick "Thread Count".

> Can the OS take the mem which is still unused by the JVM (memMax-memTotal) 
> for handling threads or is it reserved for the JVM after starting tomcat?

You are reserving heap and permgen memory when the JVM starts.  Thread
memory, and kernel resources for threads, are outside of this total.

> Due to problems with one of our webapps which sometimes does not close the 
> threads completely (they stuck in close_wait-state) we increased the max 
> threads of windows:
>
> http://publib.boulder.ibm.com/infocenter/pvcvoice/51x/index.jsp?topic=/com.ibm.websphere.wvs.doc/wvs/tun_conwin.html

That has nothing to do with threads (and CLOSE_WAIT is a feature of
TCP, not of threads).  That link contains no information about
increasing the maximum number of threads in Windows.  It links to
TCP/IP tuning.  Wrong link, or wrong assumption?

> maxUserPorts have been set to about 30k if i remember correctly.

That has nothing to do with threads.

> Does anyone have an idea to get rid of the exception?

*Decrease* the number of threads in use in Tomcat 1.  If you set the
HTTP and JK maxima to the same as Tomcat 2 (which is still very
large), what happens?  Why?

- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to