Tuesday, October 7

Application Server Hangs

Below are the top 3 reasons why an application server hangs:

Reason #1: it’s a database problem.

This may sound strange, but the main reason an application server hangs is not directly related to the application server itself. If you manage to get a thread dump, you’ll just see a bunch of threads waiting and another group that’s actually running. Another possibility is that the number of waiting threads (or queued threads) will gobble up all available memory and, eventually, lead to an OutOfMemory error.

Reason #2: deadlocks.

If it seems that the application server is doing nothing, look for deadlocks. These can be database deadlocks that cause your SQL queries to hang, or seek the update statements. 

Reason #3: run-away thread.

In cases where the application server is indeed to blame, you should look for a run-away thread. These are hard to detect because they hardly show up on logs since they are usually only written when the request has completed. A run-away thread will probably not return until it has already affected the entire application. Therefore, the hanging request will not be written to the log. These ‘runaway’ threads typically include infinite loops in code.

1 comment:

  1. Did you know that you can generate dollars by locking premium sections of your blog or website?
    All you need to do is join Mgcash and implement their Content Locking tool.

    ReplyDelete