Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have two linux servers which have Apache Tomcat Installed. One is running the Database, the other is running with Java application. More than 100 users are connected to the servers. Server machines are quad core normal PC's which have 4 GB memory. It was running properly for the last 6 months but the application has recently started to run slowly . Suddenly the Java application is getting stuck & users cannot work for some time. There is no network issue. I am trying to identify the reason for this, whether it is a machine problem or the problem is in the Java application. Can any body help me with this?

share|improve this question
1  
You should let us know what steps you have done to try to try to troubleshoot this issue. From your post there is absolutely no usably information for us to go on. –  Dave Drager Jun 21 '09 at 15:36
    
Even the name of the Java application would be helpful. –  Dave Cheney Jun 22 '09 at 1:18

4 Answers 4

The first thing is to determine if this is a resource issue, or a problem with the application its self.

I would be looking at the resources availible on the servers when the slodowns happen, is there a spike in RAM or CPU use, is the Database having trouble keeping up with requests etc.

Has your application become more popular and being used by more users, concurrently than it used too, how many users are connected when the problem occurs? Are users using the application more often, or perhaps leaving it connected all day.

Secondly, could it be Java related, have you updated the JVM recently and has this caused a problem or conflict with the application that is slowing it down?

share|improve this answer
    
Missing from above. Have the features that the users are using switched to a more expensive operation (perhaps due to a new business requirement or process?)? –  Dana the Sane Jun 21 '09 at 18:20

I would actually say:

  1. Have you done any OS updates lately?
  2. Has the code in the Java App Changed?
  3. Has the usage pattern changed? (on the user end?)
  4. Who is complaining the App is slow? (Local and Remote users, just local, or just remote?)

Things don't magically change. There has to be a piece missing from the picture you've presented us.

share|improve this answer

Is the application multi-threaded and has there been any increase in user load? Sometimes threading deadlocks in an application do not appear until you get into just the right load situation, and therefore they can be a real pain to diagnose. How long has the application been in production? Has there been a significant increase in the database size in that time where specific malformed queries might be tying the system up?

share|improve this answer

2Run Virtual VM against the java process and monitor the memory usage. (if you cant run VirtualVM, then run jconsole.exe .

Some JAVA options you can set to help you with this task:

set JAVA_OPTS=%JAVA_OPTS% -Xloggc:logs\gc.log -XX:+PrintGCDetails
set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=8002 -Dcom.sun.management.jmxremote.authenticate=false
set JAVA_MEM=-Xmx1236m
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.