473,800 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 uncaughtExcepti on method.

Here's the command line:
java -server
-XX:+PrintGCDeta ils
-XX:+UseParallel GC
-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 2739
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.getRunt ime().addShutdo wnHook() to call a thread at shutdown that
contains a call to Thread.getAllSt ackTraces(). 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.getRun time().addShutd ownHook() to call a thread at shutdown that
contains a call to Thread.getAllSt ackTraces(). 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
3101
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 : ----- public String crypte(String message, String name) throws RemoteException { String messageFinal = new String;
5
3878
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 like outToClient.writeBytes("HTTP/1.0 200 Document Follows\r\n"). "outToClient.writeBytes" only write the message in the command prompt but not the browser.
1
1602
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 Personal Web Server... but we want one that will run on any machine as we are considering an application that want's to have some stuff done server side... but we want it to run both in an actual client-server environment... and in a stand-alone...
0
1314
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 placing them in ASp.NEt. I read that the equivalent of ASP.NET is Java Server Faces.
0
2784
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 by the Java TCP server. No matter how I try to send data from the client to the server, the Java server DataInputStream readUTF() method never returns with any data. Can someone please shed some light on this problem? Thanks.
0
2196
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 from my PHP client or my Java server ? here is my code
1
1835
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 we are trying to cut down the amount of data we are sending across the wire. I know their is .NET IIOP (which I can't get to compile in VS 2008), and also Hessian. Is there any other good binary remoting options to talk from a C# client to a Java...
3
2860
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 help me I am beginner in this field ............thankyou very much javascriptis given below:
0
1484
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 writeObject() to send them. Works great. But now I would like to use C# clients as well. How can I send a serialized string object in C# that the Java server code would know how to de-serialize?
0
9690
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.