Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Java server app "disppears"

Thread view: 
Ed Mittelstedt - 13 Jun 2006 12:04 GMT
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
Fergus Gibson - 28 Jun 2006 12:12 GMT
> 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.
Ed Mittelstedt - 29 Jun 2006 15:21 GMT
>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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.