This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
35 Replies Last post: May 28, 2008 6:56 AM by ryan.rutan@ni.com  
Click to view casadyc's profile Novice 33 posts since
Apr 27, 2007

Apr 8, 2008 12:20 PM

Clearspace 2.0, Tomcat 5.5 service hangs on Windows

When I was upgraded from Clearspace 1.10 to 2.0 using the WAR file with a Tomcat 5.5 server on Windows 2003, the Tomcat service will peg the CPU at 100% when the clearspace.war file is dropped into the webapps folder and the Tomcat Windows service is restarted. It appears that the service is hung, but it eventually recovers and then begins to run normally.

 

Here's the sequence of events as it happened for me:

  1. Stopped the Tomcat Windows service.
  2. Backed up jiveHome directory and clearspace database
  3. Removed the existing clearspace directory and clearspace.war file from the webapps folder.
  4. Modified the WAR file by using the "EditWAR.jar" tool to modify my jiveHome directory.
  5. Dropped the new WAR file into the webapps folder.
  6. Restarted the Tomcat Windows service.
  7. Confirmed that the clearspace folder under webapps is generated.

At this point, the CPU is pegged at 100% by the Tomcat service (tomcat5.exe). After several minutes, the utilization dropped and I was able to proceed with the upgrade process by pointing the browser to the Clearspace site.

 

After completing the upgrade, the instructions stated that I needed to restart the application. Since I had the service MMC up and Clearspace is the only app installed in this Tomcat installation, I just restarted the Tomcat service. Again, after restarting the service, the CPU was pegged at 100% for several minutes before it became usable again.

 

I have confirmed that the application causing Tomcat to peg the server is Clearspace because I have restarted the service several times successfully without the clearspace.war file deployed.

 

Currently at this point, while the app appears to have been upgraded successfully and configured properly, Clearspace now causes 100% CPU utilization upon any request of the web application, or whenever the application is reloaded from within the Tomcat Web Application Manager.

 

Does anyone have any ideas what would be causing this? Have I missed some critical configuration piece for my scenario?

 

Here's a summary of my setup:

- Windows 2003 Server Enterprise SP2

- Sun JVM 1.6.0_01-b06

- Clearspace 2.0 (version downloaded today)

- Apache Tomcat 5.5.26

 

I'd love to hear the simple and silly thing that I missed which is causing me so much pain.

 

Thanks,

Chad

Click to view Jochen Kirchgessner's profile Novice 17 posts since
Feb 19, 2008

Hi Chad,

 

I'd love to give you the reason for your problem but I cant. Even worse: same here. The environment:

 

- Windows XP SP2

- Sun JVM 1.6.0_01-b06

- Clearspace 2.0

- Apache Tomcat 5.5.26

- MySQL 5.0.51

 

After waiting for Tomcat bloating up to about 150 MB while using 100% CPU (takes about 2 to 3 minutes), everything runs well. This happened after I got the Clearspace Community Beta 6 war file and deployed it to Tomcat using a virgin jiveHome folder. Any explanation for possible mistakes during setup would be helpful.

 

Cheers,

Jochen

Click to view Beau Gordon's profile Novice 72 posts since
Aug 27, 2007

Me too.

 

Windows 2k3 server

Tomcat 6.0.14

Java 1.5_13

MySQL 5.0

 

It's taking substantially longer than a couple of minutes in my case, though this may be because I am running in a VM and not giving enough resources to clearspace.. This is just a clean install in a test environment.

Click to view Jochen Kirchgessner's profile Novice 17 posts since
Feb 19, 2008

Chad,

 

I can confirm that after this "initialization" process, Clearspace runs fine on my system. Sorry to hear it's not like that for you. Further I have to correct myself, I'm running Tomcat 6.0.16 - sorry about the wrong information.

 

Jochen

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

If you're experiencing a brief period of high CPU usage right after you've installed the clearspace.war is probably due to Tomcat deploying it. That's expected behavior, but shouldn't last more than a minute or so on modern hardware (your milage may vary if you're using a VM).

 

- Seth -

 

 

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

Hi Chad,

 

Based on the error, you can try increasing the amount of memory available to Clearspace.

 

For our recommended memory configuration, take a look at our Recommended Environments doc.

 

In your case, try putting the following in your <tomcat install dir>\bin\startup.bat file (anywhere before the line that says call "%EXECUTABLE%" start):

 

set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m

 

 

- Seth -

Click to view Beau Gordon's profile Novice 72 posts since
Aug 27, 2007

Seth,

 

The thing that is causing me some concern is that I'm having this problem using the exact same configuration which has worked just fine for 1.x versions of Clearspace. Usually with 1.x, restarting Tomcat spikes the CPU for 10-15 seconds. No problem. With 2.0, that spike is lasting for >30 minutes for me. In my case, it looks like once it gets through that spike, it works properly. I am using a VM, but I have the same Java memory configuration that you recommended.

 

Maybe this is a Windows+Tomcat thing, as that seems to be the commonality between the people on this thread.

 

Beau

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

Hi Beau,

 

How much memory do you have allocated to Tomcat (and to your VM)?

 

Can you try running Clearspace outside of your VM and see what your performance is like?

 

 

- Seth -

 

 

Click to view Beau Gordon's profile Novice 72 posts since
Aug 27, 2007
Apr 9, 2008 11:07 AM in response to: seth
Re: Clearspace 2.0, Tomcat 5.5 service hangs on Windows

My VM has 1.5 GB on a P4 3.0 Ghz machine. No other VMs are running.

 

My java options are set at 512 min/1024 max heap and 256 for the permsize, same as your recommendations.

 

I don't think this is a memory issue. Tomcat is using 182 MB right now and my DB is empty. I never get to the point where I am paging memory. It's just the CPU. It acts like there is something that it gets stuck on while Tomcat is starting up.

 

I appreciate your help so far, but I feel you need to address the reason why there is such a big difference between 1.x and 2.0. I'm seeing a 12000% increase in startup time between the two versions using the exact same Java and Tomcat settings. That seems like a red flag that should be investigated.

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

If you're not using Web Services, you might try disabling them. That should improve startup time somewhat. You can do this by setting -Djive.ws.disabled=true in your JVM options.

 

I can understand the inconvenience of having longer startup times (especially when you're doing migration and testing out settings), but under normal use cases I wouldn't expect you to have to start Clearspace that often.

 

- Seth -

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

Hi Beau,

 

I've been doing a bit of research on this, and adding the -server JVM option has significantly improved startup performance. In some of the tests that I ran, adding -server reduced the startup time by a factor of 4.

 

Setting: -XX:UseConcMarkSweepGC -XX:UseParNewGC may help runtime performance as well.

 

 

- Seth -

Click to view Bruce Ritchie's profile Expert 2,286 posts since
Jun 28, 2001

Chad,

 

I would suggest using the JDK, not the JRE and explicitly set the -server flag to force the JKD to use that VM. Depending on the JDK and OS the JDK may or may not use the server JVM by default - I think the JDK on Windows XP/Vista would use the client JVM unless otherwise told to use the server JVM.

 

 

Regards,

 

Bruce Ritchie

Click to view seth's profile Expert 670 posts since
Feb 12, 2008

Hi Chad,

 

I have a Clearspace 2.0 installation that idles at around 150 MB, and a 1.10.5 install that idles around 100MB. These are both test installs without much data in them, so those numbers are probably good estimates of the minimum memory requirements.

 

If you're running Clearspace in a virtual machine, you are definitely going to benefit from more memory. Remember that if a Windows virtual machine has low memory, it's going to start paging memory out just like a real Windows machine will (swap memory on virtual machines is a real performance killer).

 

If your (physical) server supports it, you should enable VM hardware acceleration (in the BIOS). That will usually give you a 10-20% performance boost. Also, if you have your database server on the same VM (or on a VM at all), you should move that to a real server as well.

 

That "certain collaboration from Redmond" lists a 2.5 GHz processor with 1GB of RAM as for it's minimums, by the way

 

 

- Seth -

Click to view jbaldwin@rileykids.org's profile Novice 20 posts since
Mar 15, 2007

Yep - same here. Except, that the CPU nevers settles down (left Tomcat running for at least 30 minutes before I killed the java.exe in the task manager). My experience with the 1.x versions was that a launch would cause a CPU spike that would settle down after a few minutes. This version never gives up its impact on the processing environment.

 

BTW: I boosted the Tomcat memory settings per the above suggestion: set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m

 

The box I am using for Clearspace is running Windows Server 2003, Celeron processor, 4gb RAM. The server also runs Openfire and MS WSUS.

Click to view jbaldwin@rileykids.org's profile Novice 20 posts since
Mar 15, 2007

I'm not that technically inclined - nor, do I know much about Java and VM's. Should I boost the memory using the following spec:

 

JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m

 

If so, what do you recommend setting it to?

 

Clearspace is not working now. I am considering going back to 1.10.5. That at least worked.

 

thanks!