PDA

View Full Version : Tomcat Service Shuts Down


bigbeatxl
11-09-2004, 07:01 PM
First, let me apologize for the vague post, but I need help diagnosing my problem as all I have is the symptom.

I have the LPS 2.2 core on Windows XP with SP2 and Tomcat 5.0.28 running as a service (port 8080). Apache webserver is on the same machine (port 80).

I'm learning to use LPS and am writing simplistic and basic lzx files. Once written, I access them via the web (not local) to see the results. For a time, this process works, but eventually I'll get 'the connection was refused' from my browser. I would just hit refresh to see the minor changes I make when I get this message. Come to find out, the tomcat service just stops with no warning or messages.

It happens frequently enough to be annoying, but it's most incovenient when I'm away from my machine, and trying to show other people progress when the service stops running and I'm unable to restart it remotely.

Like I said, it's pretty vague, but how do I isolate the problem and track this down? There seems to be no trigger besides standard requests for a laszlo app. Any advice?

petit
11-16-2004, 04:32 PM
Hi bigbeatxl!

I have the same problem while trying to run the samples that comes vith Laszlo.
I'm running the core installed on Tomcat 5.019 on an Win XP system, SP2, so it's rather the same setting as you have.

I'm running the client ( Firefox ) on the same computer though.

I believe it is a memory thing. While compiling the examples an checing the system with Taskmanager, I can see that java.exe ( running Tomcat servlet container, the Laszlo webapp and all klasses needed for compilation ) uses a lot of memory and 96-98 % of all CPU cycles.

Suddenly tomcat breaks down without any word of comfort.

I don't know the answer to this. It could be that the Laszlo service is very heavy on resources.
Or the maximum memory allocated for the Java runtime running Tomcat has to be set higher.
Or the compiler leaks memory resulting in a crowded heap.

If anyone knows please throw a post.

/Petit

d~l
11-17-2004, 02:09 AM
If you are running LPS on your own Tomcat server

In .. Section 4 - Deployer's Guide (]http://www.laszlosystems.com/lps/docs/deployers-guide.html)


Setting Java memory (heap) sizes

You can set the heap sizes via the -Xmx and -Xms command line options like

JAVA_OPTS='-Xmx256m -Xms256m'

which will set both the initial and maximum heap sizes to 256MBytes.
See your servlet container documentation, in particular, for where to place this setting.


I have set -X variables in Environment ..

%CATALINA_OPTS% = -Dlog4j.configuration=file=/C:/Tomcat5/conf/log4j.properties -Xms256M -Xmx256M

not sure if this is the correct location (could be one of the Tomcat batch files) but it seems to stop the "out of memory" messages (and the log4j error messages).

petit
11-17-2004, 03:42 PM
Hi d~l!

Yo're really alert an helpful.

I tried the JAVA_OPTS version now and I'm still having the same problem.
I suspect someting in my setup is very wrong - while it shouldn't.
One simple application from the examples nearly stalls the computer and gives java.exe a footprint of 106 MB memory, which isn't resonable. Finally the client is rejected.

None of my own ( small ) applications behaved like this and larger apps works as well, such as Macromedia Flex and Cocoon.

In my next visit to the Laszlo app I'll go for the 'full' version with a built in Tomcat to see if it behaves better.

I'll get back to the problem with core on Tomcat 5.x later though.

Thanx for your helping hand!

/Petit

bigbeatxl
11-17-2004, 07:43 PM
I suspected a memory problem as well, so I'll see if Java_OPTS does the trick. Maybe I'll just use this as an excuse to upgrade my computer...

Eventually, I got around to writing an lzx with an invalid pointer, which seemed to duplicate the problem. This wasn't the initial case as you said petit since basic lzx's would crash tomcat.