-
1. Re: OutOfMemoryError: OracleConnection.pingDatabase
vickyk Nov 28, 2006 6:37 AM (in response to djr667)>>OutOfMemoryError: unable to create new native thread
" The default stack size for Java 1.4x 64-bit mode JVM- created threads is 1MB."
Try reducing this by using the -Xss switch you will be able to generate more Threads , yes the application threads .
I think you are getting this error when there is a heavy load , is that correct .
Also check this
http://www.egilh.com/blog/archive/2006/06/09/2811.aspx
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/threads.html -
2. Re: OutOfMemoryError: OracleConnection.pingDatabase
djr667 Nov 28, 2006 8:41 AM (in response to djr667)Thanks for the quick answer.
The server is not under heavy load, we have seen this problem just after startup when no more than 2 or 3 users are active.
Admittedly 2 users are using a EJB3-heavy (i.e. lots of bean cross references, fetch joins etc) page simultaenously.
We have had problems with JVM options before, mainly because we use JasperReports which eats alot of PERM space. But in this particular case JasperReports has not been active.
My current thinking is to disable the connection checker and use connection-sql strings instead and see what happens.
Dave -
3. Re: OutOfMemoryError: OracleConnection.pingDatabase
weston.price Nov 28, 2006 9:54 AM (in response to djr667)Please follow up on this and let us know if you are still having issues. If so, I need to find the cause. The OracleValidConnectionChecker could stand some reworking as it is.
-
4. Re: OutOfMemoryError: OracleConnection.pingDatabase
djr667 Nov 29, 2006 2:10 AM (in response to djr667)I'm trying.
One thing that does not help is that server.log gets wiped out (i.e emptied or overwritten) when this error happens and JBoss restarts. All I have to work on is the console output.
Dave -
5. Re: OutOfMemoryError: OracleConnection.pingDatabase
oglueck Nov 30, 2006 10:31 AM (in response to djr667)To keep the server.log set the "append" property to true in your Log4J appender. See conf/log4.xml.
-
6. Re: OutOfMemoryError: OracleConnection.pingDatabase
oglueck Nov 30, 2006 10:37 AM (in response to djr667)On 32 bit architecture the JBoss process can allocate at max. 2GB of memory. You gave it 1GB of heap. Plus some PermGen. The rest is available to stack space. Every thread allocates its own stack. This may be 256kb to 1MB depending on your platform (see you JVM documentation). It's a simple calculation how many threads you can spawn like so.
1. Reduce the number of threads: reduce MDB / EJB pools, reduce number of EJBs/MDBs/timers.
2. Reduce your heap (-Xmx parameter) to make more memory available to the stack
3. As a last resort reduce your stack size (-Xss parameter)
Use jconsole to see how much memory you really need in heap and permGen. -
7. Re: OutOfMemoryError: OracleConnection.pingDatabase
djr667 Dec 1, 2006 3:24 AM (in response to djr667)I have had problems with this particular Web-App page before. It used to cause 'CompilerThread' errors in the JVM (causing the JVM to exit) before I rearranged the EJB loading order. I cannot find my original bulletin board post about the CompilerThread issue (do JBoss purge old posts?).
My feeling is that we are pushing EJB/Java/??? too hard. It does not set a good impression when this is our first sizeable EJB project, and I cannot say that it is particularly complex.
Dave
P.S. Server spec:
Windows 2000 (5GB RAM, 4 CPU)
JBoss 4.0.4.GA - EJB3 configuration installed