OC4J Instance Hanging due to more number of connections.

oraclescsa
oraclescsa used Ask the Experts™
on
Hi ,

We are using a java application for our company to maintain the records of the employee.
When the number of users are increasing to 200 , users are facing the hanging in the website and we need to restart the oc4j instance. This is becoming big head ache for us to restart the
oc4j instance everytime it hangs.
We have currently 600-800 concurrent users connecting.

Environment

Oracle 10g Database
Standalone OC4J Instance
Windows 2003 Server

Need your advice on this urgently.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
What is the processes spfile parameter set to?  You might need to increase it.

I would also check your application and make sure you are properly disposing of the connections when you are done with them so the database doesn't think the are still active.

Author

Commented:
processes is set to 500 in the parameter file.

How can we check whether they are disconnecting from database or not ?

Is there any parameter in application that would do this ?
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
>>processes is set to 500 in the parameter file.

You say you have 600-800 users connecting...  Do you see a potential math problem here?

Increase the processes parameter to the MAX number of users you will ever have and add a few extra for Oracle background processes.

>>How can we check whether they are disconnecting from database or not ?

Check v$session to see what/who is currently connected.

>>Is there any parameter in application that would do this ?

Not a Java person but in ASP.Net there are a 'close' and 'dispose' method that will release them from the connection pool and allow Oracle to free them up.

You need to go through the code and make sure all connections are being properly released.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
I will try to increase the number of processes to 900 and i will monitor.

Is there any way from database to disconnect the sessions of application if the idle timeout is 1 hour
or can we create a script that will check the connections older than 1 day ?

Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
Check out the following link for idle options:

http://www.dba-oracle.com/t_connect_time_idle_expire_timeout.htm

You might be able to write a script to kill the session but that could be dangerous since it will rollback any uncommitted transactions.  I'll leave that as a last resort.

Author

Commented:
I have increased the processes to almost 1000 but still the users are facing hanging problem when sessions reaches 500.

I dont know where is the problem and it just hangs and we need to restart the oc4j instance.
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
Now you need to roll up your sleeves and start troubleshooting.

Is the database or server maxing out on resources?  In other words is the 'hang' just resource contention?

If not, I would jump into the app to see what might be causing it.  I won't be able to help much there since I'm not a oc4j person.

Make sure you are patched up.  Might be a bug.

I would suggest you open an SR with Oracle just in case we cannot help here.

Author

Commented:
It helped a great deal in solving the problem

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial