tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Java process killed by oom-killer in Ubuntu
Date Thu, 07 Jun 2012 20:26:27 GMT
Hash: SHA1


On 6/7/12 3:03 PM, Jorge Medina wrote:
> I am using MongoDB through the Java driver allowing up to 100 
> connections to the MongoDB server.

100 connections sounds a bit high to me, but I don't know your
requirements.... nor do I know anything about the MongoDB driver. I
suspect it's not a JDBC driver since Mongo is document-oriented and
not SQL-oriented.

> I also use DBCP with a max size of 50 JDBC connections. My webapp
> uses about 150 JAR files.

Neither of those seem unusually high.

> There is no native libraries loaded from my webapp as far as I
> know. All the app is pure Java code.  (Nevertheless, Tomcat is
> using the Tomcat Native Library)

Have you tried disabling the native library to see if it has any
effect? tcnative is fairly stable, but it's something that is easy to

> Is there a way I can monitor the number of file descriptors in use
> by the app?

I dunno about realtime, but you can use something like 'lsof' to check
on the open file descriptors of a process. Remember that a socket
connection requires two file descriptors: one to read and one to
write. If you have maxed-out your db connections, you'll have 300 file
descriptors open at once. That's not terribly high, but you'll be
using fds for other things as well (incoming HTTP connections, etc.)
and could use-up a lot of native memory that way.

> I have monitored the number of threads, but I haven't seen
> anything unusual. (but it could be that the burst is too fast to
> get catch by the monitoring tool)

What about JVM startup parameters? Also <Connector> configuration?

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message