Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-12518, TNS:listener could not hand off client connection

I am using ORACLE database in a windows environment and running a JSP/servlet web application in tomcat. After I do some operations with the application it gives me the following error.

ORA-12518, TNS: listener could not hand off client connection

can any one help me to identify the reason for this problem and propose me a solution?

like image 463
Dinidu Hewage Avatar asked Nov 29 '12 11:11

Dinidu Hewage


2 Answers

The solution to this question is to increase the number of processes :

1. Open command prompt 
2. sqlplus / as sysdba; //login  sysdba user
3. startup force;
4. show parameter processes;  // This shows 150(some default) processes allocated, then increase the count to 800
5. alter system set processes=800 scope=spfile;

As Tried and tested.

like image 160
Dish Avatar answered Sep 30 '22 17:09

Dish


In my case I found that it is because I haven't closed the database connections properly in my application. Too many connections are open and Oracle can not make more connections. This is a resource limitation. Later when I check with oracle forum I could see some reasons that have mentioned there about this problem. Some of them are.

  1. In most cases this happens due to a network problem.
  2. Your server is probably running out of memory and need to swap memory to disk.One cause can be an Oracle process consuming too much memory.

if it is the second one, please verify large_pool_size or check dispatcher were enough for all connection.

You can refer bellow link for further details. https://community.oracle.com/message/1874842#1874842

like image 40
Dinidu Hewage Avatar answered Sep 30 '22 19:09

Dinidu Hewage