473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Java server app "disppears"

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
2 2714
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benoît | last post by:
Hi, I have a problem with the string array type. I want to send a string array from the php client to the java server (Webservice with SOAP). Here is the code : ----- Java server method : -----...
5
by: kaiwing18 | last post by:
Hi, I have a simple java server program, i want to ask how can i output a simple HTML page of error message, without calling a html file. That means i want to type HTML codes in the program...
1
by: tmb | last post by:
Is there a Java Server that will run on the clients machine for doing web development without having up upload the web page to an actual server for testing? Microsoft once had one called...
0
by: SP | last post by:
Hello there, I have a custom ASP.Net application. I would like to place custom Java code within ASP.Net. so i would like to follow the approach of creating Java Server Controls and then...
0
by: netgeni59 | last post by:
Hello fellow C# friends, I am trying to write a C# TCP client that was formerly written in Java. The server must still remain in Java. I cannot get text data from the C# client to be received...
0
by: Eric | last post by:
Hello I wan't to use a client PHP XMLRPC with my Java server XMLRPC. For simple type, all works fine. But for type like array, my server java lose my parameters ! How can I know if it comes...
1
by: nelsonbrodyk | last post by:
Hey All, I currently have C# clients, and I want them to talk to a Java server side running on Glassfish application server. I am wondering if anyone has some options outside of webservices, as...
3
by: vipendra | last post by:
Hello , everybody I want to know how javascript code can be add in Java Server Faces. I am trying to do it but gives error ......... i want to add java script code in JSF page page1.jsp Please...
0
terranche
by: terranche | last post by:
I've got a Java server daemon, spawning threads to handle client requests. The requests come via sockets, and the Java server uses readObject() to recieve them. My Java clients simply use...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.