Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The machine(linux) runs three servers wating for TCP connections, writing in JAVA. After they runs steadily for about two weeks, the system load suddenly raises utterly high to 30.05, 12.93, 9.70(during the two-week normal running, it is often 0.0 , 0.0, 0.0), and it flaps sharply.

I log on to it, check by vmstat, found nothing specical, except that memory usage is a bit of abnormally high.

So I restart the three java servers and it goes well again.

Are there any tools or methods to figure out what exactly causes this problem if I encounter it again?

share|improve this question

closed as not constructive by Brent Pabst, John Gardeniers, Magellan, rnxrx, Ward Oct 16 '12 at 17:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

As a good developer have you traced and profiled your own code before suspecting the server? It can take weeks for excessive memory usage or errors in the code to surface. – Brent Pabst Oct 11 '12 at 1:58
Yeah, I'm doing it. Thanks. – larmbr Oct 11 '12 at 2:10
And during those days, weeks or whatever you should be seeing the memory used by Java gradually increasing. You don't have to wait for the system to screw up to diagnose this. – John Gardeniers Oct 11 '12 at 2:57
up vote 1 down vote accepted

Java, high-memory usage after 2 weeks ... smacks of memory leak, and resulting swapping (I/O bound, which might explain the load quite easily). If, as you say, vmstat looks normal (you checked si / so?) it could be that some other form of comms between java process and either clients or each other aren't being handled quickly enough any more.

share|improve this answer
Yes, sounds like a application issue, potentially caused by underlying hardware constraints but still something fishy at the application layer. – Brent Pabst Oct 11 '12 at 2:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.