Connections to Database Fail Reporting ORA-12547: TNS lost connection

(Doc ID 1289174.1)

Last updated on JANUARY 28, 2011

Applies to:

Oracle Net Services - Version: 9.2.0.8 and later   [Release: 9.2 and later ]
Information in this document applies to any platform.

Symptoms

Connections to the database, intermittently start to fail, reporting the error code ORA-12547: TNS lost connection.Upon checking the server, Netstat command shows many threads with a state of LISTENING  for local and Foreign address 0.0.0.0

Proto Local Address Foreign Address State     PID

TCP   0.0.0.0:53    0.0.0.0:0       LISTENING 1564
TCP   0.0.0.0:88    0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:135   0.0.0.0:0       LISTENING 740
TCP   0.0.0.0:389   0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:445   0.0.0.0:0       LISTENING 4
TCP   0.0.0.0:464   0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:593   0.0.0.0:0       LISTENING 740
TCP   0.0.0.0:636   0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:1030  0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:1031  0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:1044  0.0.0.0:0       LISTENING 1772
TCP   0.0.0.0:1114  0.0.0.0:0       LISTENING 2000
TCP   0.0.0.0:1117  0.0.0.0:0       LISTENING 3656
TCP   0.0.0.0:1139  0.0.0.0:0       LISTENING 3236
TCP   0.0.0.0:1263  0.0.0.0:0       LISTENING 1564
TCP   0.0.0.0:1581  0.0.0.0:0       LISTENING 2000
TCP   0.0.0.0:3268  0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:3269  0.0.0.0:0       LISTENING 408
TCP   0.0.0.0:3389  0.0.0.0:0       LISTENING 3000
TCP   0.0.0.0:4899  0.0.0.0:0       LISTENING 1896
TCP   0.0.0.0:17970 0.0.0.0:0       LISTENING 19

Oracle Net level 16 server tracing of the processes, shows connections are not completing,
Summary of key sections of trace, all 12k in size
[10-12-2010 11:31:33:026] niotns: Not enabling dead connection detection.
[10-12-2010 11:31:33:026] niotns: listener bequeathed shadow coming to life...

[10-12-2010 11:31:33:026] nsinherit: doing connect handshake..

[10-12-2010 11:31:33:026] nsinherit: ADR="(ADDRESS=(PROTOCOL=tcp)(DEV=340)(HOST=xxx.xxx.xx.xx)(PORT=1521))"
[10-12-2010 11:31:33:026] ntprd: entry
[10-12-2010 11:31:33:026] sntpread: entry
[10-12-2010 11:31:33:026] sntpread: Attempting to read 4 bytes from 24796

[10-12-2010 11:31:33:026] nttgetport: port resolved to 1521
[10-12-2010 11:31:33:026] nttgetport: exit
[10-12-2010 11:31:33:026] nttbnd2addr: using host IP address: xxx.xxx.xx.xx

All the traces end here

[10-12-2010 11:31:33:042] nsopen: opening transport...
[10-12-2010 11:31:33:042] nttcon: entry
[10-12-2010 11:31:33:042] nttcon: toc = 3
[10-12-2010 11:31:33:042] nttcnp: entry
[10-12-2010 11:31:33:042] nttcnp: getting sockname
[10-12-2010 11:31:33:042] nttcnp: exit
[10-12-2010 11:31:33:042] nttcnr: entry
[10-12-2010 11:31:33:042] nttcnr: waiting to accept a connection.

Sockets are never released and a restart of the database free the resources.
ORA-12547 is a sympton of lack of sockets on the system
Setting SQLNET.EXPIRE_TIME does not help

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms