By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,647 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,647 IT Pros & Developers. It's quick & easy.

Java server app "disppears"

P: n/a
Hello,

I've been wrestling with this problem for almost 4 months now. I am
trying to run two instances of the same java server app on 1 linux
box.

Basically they are listening on seperate ports.

The problem is that one of the apps continiously just"disappears" with
no sysout or syserr message to find out what happened.

The box is a Red Hat 9 with 512MB of RAM.

Java version is 1.5.0_06, and I even compiled the app using the
ThreadGroup class overiding the uncaughtException method.

Here's the command line:
java -server
-XX:+PrintGCDetails
-XX:+UseParallelGC
-XX:GCTimeRatio=9
-Xmx32m
-Xloggc:gcc
<appname> >log 2>&1

I know 32MB is very small for a heap, but its what I've manage to come
to get at least one of the apps to run more than 24 hours without just
disppearing. Anything larger and they both disappear within hours.

I'm running MySQL on the same box, checking top now shows that its'
only taking about 36M after running for weeks. 512MB should be big
enough to run these 3 things, right? Whats killing me is the lack of
information.

Can anyone shed light on this?

Thanks in advance,
Ed Mittelstedt
Jun 13 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ed Mittelstedt wrote:
The problem is that one of the apps continiously just"disappears" with
no sysout or syserr message to find out what happened.
[...]
I know 32MB is very small for a heap, but its what I've manage to come
to get at least one of the apps to run more than 24 hours without just
disppearing. Anything larger and they both disappear within hours.
So if you set the heap size LARGER, the application halts sooner? That
seems quite odd. Are you certain the behaviour is linked to heap size
rather than being coincidental?

I'm just brainstorming here, but you might gain some information by using
Runtime.getRuntime().addShutdownHook() to call a thread at shutdown that
contains a call to Thread.getAllStackTraces(). Dumping those might give you
some idea what's happening at the point your application exits. Then again,
you might just see some useless shutdown calls. I've never tried this.

I'm wondering if something weird is happening with your JVM or if your
application is exiting because it's unexpectedly reaching the end of its
thread(s).

I'm running MySQL on the same box, checking top now shows that its'
only taking about 36M after running for weeks. 512MB should be big
enough to run these 3 things, right? Whats killing me is the lack of
information.


512MB should be fine to run a MySQL server and two Java processes with 32MB
of heap each.
Jun 28 '06 #2

P: n/a
On Wed, 28 Jun 2006 11:12:48 GMT, "Fergus Gibson" <no****@noemail.com>
wrote:
I'm just brainstorming here, but you might gain some information by using
Runtime.getRuntime().addShutdownHook() to call a thread at shutdown that
contains a call to Thread.getAllStackTraces(). Dumping those might give you
some idea what's happening at the point your application exits. Then again,
you might just see some useless shutdown calls. I've never tried this.


Fergus, thanks for the reply! I'll try this immediately and let you
know.
Ed Mittelstedt
CCG Workshop
http://www.ccgworkshop.com
Jun 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.