tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: How to solve the problem "java.lang.OutOfMemoryError: unable to create new native thread" in Tomcat5.5.26
Date Wed, 02 Dec 2009 16:41:11 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter,

On 12/1/2009 1:51 AM, Peter Chen wrote:
> The memory given to the JVM is $JAVA_OPTS -Xms512m -Xmx1024m
> The memory of the Solaris system is: Memory size: 4096 Megabytes
> 
> The result of executing command ulimit -a is as follows:
> -bash-3.00$ ulimit -a
> core file size        (blocks, -c) unlimited
> data seg size         (kbytes, -d) unlimited
> file size             (blocks, -f) unlimited
> open files                    (-n) 256
> pipe size          (512 bytes, -p) 10
> stack size            (kbytes, -s) 8192
> cpu time             (seconds, -t) unlimited
> max user processes            (-u) 29995
> virtual memory        (kbytes, -v) unlimited

Hmm... no information about the threads-per-process. Try this in a C
program:

sysconf( _SC_THREAD_THREADS_MAX )

or something like that. You'll have to look at the manual page for
sysconf on your system to determine the exact parameter to use and the
exact meaning of the return value (though it should be somewhat standard).

You may also have to look in /usr/include/unistd.h or
/usr/include/bits/confname.h (where these SC_* constants are defined on
my system) to determine what the parameter should be.

The above might not work if POSIX threads are not being used.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksWmKcACgkQ9CaO5/Lv0PAkQgCfeBmzlXP6LtV92qaMprK/vvPm
AZ8AnizN90vFlSUSdszqu1KzAMmDRiXL
=5a4X
-----END PGP SIGNATURE-----

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


Mime
View raw message