Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

Server Hangs

Maneesh_3
Occasional Contributor

Server Hangs

hi,
While running the java multithreading application some times the % of cpu goes to 98% and when cpu goes to 98% the Application hangs

I have hp-unix B.11.0 and patch PHCO_29959 already installed on it ...

I heared thats we needed some java patches for smooth running of java multithreading application ....

1) what java patches we needed for smooth running of the multithreading application
2) How to check which java patches already installed
3) How to install New Java Patches

2)
7 REPLIES
KapilRaj
Honored Contributor

Re: Server Hangs

when java takes too much cpu , i was advised by one of the apps guy to perform a "kill -QUIT to generate a coredump for him to analise ..

Kaps
Nothing is impossible
Sanjay Kumar Suri
Honored Contributor

Re: Server Hangs

Rahul_19
Advisor

Re: Server Hangs

Hi Maneesh,

Just for your information.

Ok.....First thing first ...Application never hangs :) either it goes in the infinite loop or its process goes very slow so it appear to be hanged ( Not Responding mode ) . Since you are involved in the Multithreading Java application I think you need to optimize your Java code, open the thread only when it is very necessary and kill it as soon as its done. And if possible set the thread priority as necessary.

And above problem is not only in Java , it happens in all the multithreading process in one way or another.

Regards,
Rahul.





Be as radical as reality.
Eric Antunes
Honored Contributor

Re: Server Hangs

Hi,

I have java running fine and don't have this PHCO_29959 patch installed...

I just have:

Java-Dev-Kit1-1 -> C.01.18.00 Java Developers Kit |
|| Java-Docs1-1 -> C.01.18.00 Java Documentation |
|| Java-Runtime1-1 -> C.01.18.00 Virtual Machine for Java
Each and every day is a good day to learn.

Re: Server Hangs

Check your name resolution. We had a similar issue which turned out to be because of two interface cards having the same name but different IP addresses in our /etc/hosts
R. Allan Hicks
Trusted Contributor

Re: Server Hangs

It really sounds like your application may be in a deadly embrace.

This can occur when there is no co-ordination between threads. I forget the java calls that can be used to co-ordinate threads, but basically look at the resources that each thread uses.

Say one thread locks a resource or even a database object. Database locks can be suttle so look carefully. May be one thread updates a row and hasn't committed and a second thread attempts to update the same row. I wouldn't expect it to go to 98% but if the thread that wants a resource is continuously trying to acquire it, it would be a tight loop just as someone else has already pointed out.

Another possibility might be in exception handling. Do you have anything that does an immediate re-try on a failure?

Just some thoughts.

-Good luck
"Only he who attempts the absurd is capable of achieving the impossible
Ted Buis
Honored Contributor

Re: Server Hangs

If I remember correctly, GlancePlus is good for looking at threads as you can see the CPU consumption of each thread and the system calls.
Mom 6