Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Memory management

939980Jun 6 2012 — edited Jun 8 2012
While running a batch job we get below error in database.

"ORA-12801: error signaled in parallel query server P249, instance derintoin:hint1 (1)
ORA-12853: insufficient memory for PX buffers: current 1552016K, max needed 6500304K
ORA-04031: unable to all"

Oracle Database version --11.2.0.1.0

SGA is set to 8gb but memory parameters are set to 0

SQL> show parameter sga

NAME TYPE VALUE
--------------- -------------------------------- -------
sga_max_size big integer 8G
sga_target big integer 8G


SQL> show parameter memory

NAME TYPE VALUE
---------------------- ---------------- ------
memory_max_target big integer 0
memory_target big integer 0

There are totally 10 databases are running in the server.
Memory size:126gb
Number of CPU -- 48

Please advice me whether i should increase memory parameters or sga parameters to resolve the error.If i have to increase memory ,please advice how much i should increase .

Thank you
This post has been answered by Hemant K Chitale on Jun 7 2012
Jump to Answer

Comments

447039
One more note to the message. when I restart the database service, the application works fine. When I get this error, I did a tnsping and tnsping didnt give any errors.

Thanks,
Sirisha
This is an issue your DBA needs to address, it is not due to your client application --

Here is a Metalink note I found - for further information you will need to contact support.

Article-ID: Note 240710.1
Title: Intermittent TNS-12516 or TNS-12519 Errors Connecting Via
Net
Symptom(s)
~~~~~~~~~~
Client connections may intermittently fail with either of the following errors:

TNS-12516 TNS:listener could not find instance with matching protocol stack
TNS-12519 TNS:no appropriate service handler found

Additionally, a TNS-12520 error may appear in the listener log.

TNS:listener could not find available handler for requested type of server

The output of the lsnrctl services command may show that the service handler
is in a "blocked" state.

e.g. '"DEDICATED" established:1 refused:0 state:blocked'

Change(s)
~~~~~~~~~~

None necessarily. Perhaps increase in load.


Cause
~~~~~~~

By way of instance registration, PMON is responsible for updating the listener
with information about a particular instance such as load and dispatcher
information. Maximum load for dedicated connections is determined by the
PROCESSES parameter. The frequency at which PMON provides SERVICE_UPDATE
information varies according to the workload of the instance. The maximum
interval between these service updates is 10 minutes.

The listener counts the number of connections it has established to the instance
but does not immediately get information about connections that have terminated.
Only when PMON updates the listener via SERVICE_UPDATE is the listener
informed of current load. Since this can take as long as 10 minutes, there can be
a difference between the current instance load according to the listener
and the actual instance load.

When the listener believes the current number of connections has reached maximum
load, it may set the state of the service handler for an instance to "blocked"
and begin refusing incoming client connections with either of the following
errors:

TNS-12516 TNS:listener could not find instance with matching protocol stack
TNS-12519 TNS:no appropriate service handler found

Additionally, a TNS-12520 error may appear in the listener log.

The output of lsnrctl service may show that the service handler is "blocked".

e.g. '"DEDICATED" established:1 refused:0 state:blocked'

Fix
~~~~

Increase the value for PROCESSES.
475050
The problem is you opened to much connection.

public static void OpenConnection()
{
//open connection once in the beginning or if the connection is closed during session, reopeon it
if (conn == null || conn.State != ConnectionState.Open)
{
conn = new OracleConnection("Data Source=localhost/XE;Persist Security Info=True;Password=a;User ID=a;");
conn.Open();
}
}

call this function in the beginning of you asp.net code and don't call any close conncetion. The application cache everything, so for every time you load a new page, it open a new connection
516073
call this function in the beginning of you asp.net code and don't call any close conncetion
I'd definitely call close at the end of the page processing code if you're using ASP.NET. That will put the connection back in the pool. I wouldn't want to trust the Framework to do it for you because that may not happen until garbage collection, and by then the connection will likely be stale.

Eric
580881
I also get this error intermittently, however only when using Oracle.DataAccess.Client (ODP.Net) and never with System.Data.OracleClient. Is this really a DBA issue or is it a problem with the provider or maybe a missing setting in the connection string?
Madrid
It should be verified the number of concurrent conections to the database. If maximum DB processes parameter has been reached this is a common symptom.


~ Madrid.
618669
Hi there,
Years later, I'm getting this same error. I have an asp.net web application that does a lot of database insert, although I'm careful to close the connections after I'm done each time, I get the tns error ORA-12516: TNS:listener could not find available handler with matching protocol stack.

I'm not an Oracle DBA but I still need to fix this error on my own. I use Oracle xe 10g and Oracle 9i client and know enough oracle to develop applications.

Thanks.
cganesh-Oracle
Please post issue on the oracle xe discussion forum as this is a db issue.
675632
Thanks everyone here for sharing the root cause.

I checked in my database, the processes parameter is set to 200. And no. of connections to db were going above 190+.
After bouncing the database, the issue seems to be resolved.

regds,
Anjul
1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 6 2012
Added on Jun 6 2012
7 comments
2,347 views