Avatar of oraclescsa
 asked on

OC4J Instance Hanging due to more number of connections.

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.


Oracle 10g Database
Standalone OC4J Instance
Windows 2003 Server

Need your advice on this urgently.
Oracle DatabaseWeb ServersApplication Servers

Avatar of undefined
Last Comment

8/22/2022 - Mon
slightwv (䄆 Netminder)

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.

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 ?
slightwv (䄆 Netminder)

>>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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

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 ?

slightwv (䄆 Netminder)

Check out the following link for idle options:


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.


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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

It helped a great deal in solving the problem