• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ORA-12518: TNS:listener Could Not Hand Off Client Connection

by admin

On : 11.2.0.4 version, Clusterware, when attempting to connect to database via listener, the following error occurs:

ERROR
-----------------------

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

15-AUG-2017 01:40:01 * (CONNECT_DATA=(CID=(PROGRAM=myapp)(HOST=__jdbc__)(USER=admin))(SERVER=DEDICATED)(SERVICE_NAME=oracle)) * (ADDRESS=(PROTOCOL=tcp)(HOST=11.22.33.44)(PORT=1521)) * establish * oracle * 12518
TNS-12518: TNS:listener could not hand off client connection
 TNS-12536: TNS:operation would block
  TNS-12560: TNS:protocol adapter error
  TNS-00506: Operation would block
  Linux Error: 11: Resource temporarily unavailable 

The issue can be reproduced at will with the following steps:

$ sqlplus user/password@11.22.33.44:1521/oracle

The Solution

In Linux 6 or earlier version, you may need to check ‘max user processes’ etc. with ‘ulimit -a‘ command. But from Linux 7, there are something more need to be check:

DefaultTasksMax was default value(512).

systemd limited maximum number of tasks that may be created in the unit. This setting also effect maxpid value on OS. We observed some ‘fork rejected by pids controller’ error in OS log.

2017-08-16T02:36:55.560027+08:00 server-0 kernel: [ 165.619978] cgroup: fork rejected by pids controller in /system.slice/ohasd.service 

which indicates some fork issue due to pid limits. Listener cannot fork more process when the limits is reached, hence TNS-12518 was raised. To resolve the issue edit /etc/systemd/system.conf and set DefaultTasksMax to ‘infinity’.

# vi /etc/systemd/system.conf
DefaultTasksMax=infinity

Filed Under: oracle, Oracle 11g

Some more articles you might also be interested in …

  1. How to check the status of OMS and Agent in OEM 13cR2
  2. How to Drop Undo Tablespace in Oracle Database
  3. What are Local and Global Indexes in Oracle Database
  4. oracleasm Command Examples (Cheat Sheet)
  5. What is spfile in Oracle Database
  6. 12c ASM: PRCR-1001 : Resource ora.proxy_advm Does Not Exist (Flex ASM with Cardinality = ALL)
  7. How to Configure Device File owner/group with udev rules
  8. Oracle Database – Measuring Network Capacity using oratcptest
  9. How to Clear a Redo Log file in Oracle Database
  10. Upgrading to Oracle 12c using RMAN DUPLICATE with “NOOPEN” clause and “BACKUP LOCATION”

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright