ORA-12540: TNS: Internal Limit Restriction Exceeded Tips
Oracle Error Tips by Stephanie F.
Question: The basic error we're getting is ORA-12540
when we're trying to allocate sessions on a Redhat Linux 7.1 server running
Oracle 188.8.131.52. Here is some example output of the DB error our program is
Error while trying to retrieve text for error ORA-12540
We have tried raising the kernel limits as follows:
kernel.shmmax = 400000000
kernel.shmall = 400000000
kernel.shmseg = 32
kernel.sem = 10000 32000 100 100
We have tried configuring the Oracle DB in dedicated and MTS modes and it
doesn't seem to make a lot of difference. What seems to happen is when the
Oracle DB is running in Dedicated mode, it starts allocated new processes to
handle the connections and then we seem to get to about 512 processes across
the system and then we see the failure. We have tried altering the number of
processes, as above, but it doesn't seem to make a lot of difference and we
still get ORA-12540.
So what we need to understand is what is causing the error and how we can
utility to look up the ORA-12540 error yields the following:
ORA-12540: TNS:internal limit
Cause: Too many TNS connections
Action: Wait for connections to close and
This error is not an indication of a
network problem unless it occurs on all connections (in other words you have
never been able to connect). If so it is a .ora configuration problem.
If you can make connections up to a certain point but then fails it is an
indication of a resource limitation at the os level (this sounds like your
Typical problems are:
- Out of system memory / swap
- Out of process slots in the process table
- Streams resources depleted
- Physical connections allows by the kernal.
Note 2064862.102 Has troubleshooting techniques for this error.
Others can be found by searching MOSC with "12500" as the keyword.
You may be able to get an indication of
which OS resource is the root of the problem by tracing the listener. The
originating linux error can then be researched.
All OS error codes can be found in:
Add the lines below to the listener.ora file:
trace_directory_listener=/tmp # Or a known directory
This will define FULL listener tracing to the file
(Restart the listener to start tracing)