ORA-12537: Network Session: End of file

栏目: 数据库 · 发布时间: 7年前

内容简介:[oracle@DB-Server ~]$ oerr ora 1253712537, 00000, "TNS:connection closed"

最近开发组同事使用 AzureFunction App 访问公司内部的 Oracle 数据库时,偶尔会遇到 ORA-12537: Network Session: End of file” 这个错误。关于 ORA-12537 的详细信息如下:

[oracle@DB-Server ~]$ oerr ora 12537

12537, 00000, "TNS:connection closed"

// *Cause: "End of file" condition has been reached; partner has disconnected.

// *Action: None needed; this is an information message.

按照官方文档,引起 ORA-12537 的错误原因很多,如下所示:

ORA-12537 is an informational message and means that the connection has been closed. This error message can happen due to any of the following reasons:

  1. There are too many connections being open by the application.
  2. There are configuration issues in the sqlnet.ora, protocol.ora and listener.ora files.
  3. Database is shut down (maybe for nightly backup), but connection to database was kept by client.
  4. A timeout occurred on the client connection.
  5. A firewall closed idle connections.
  6. There is a path name that is too long for the Oracle TNS client on Windows. See Note:263489.1

一一分析、排除后,怀疑我设定的一个定期清理超过 90 分钟空闲会话的作业导致了这个问题,具体参考 ORACLE 定期清理 INACTIVE 会话 ,测试了一下,我们通过 V$SESSION 找到对应的会话,然后使用下面 SQL 终止会话。

    SQL> ALTER SYSTEM DISCONNECT SESSION 'xxx,xxx' IMMEDIATE;

    

Azure Function App 测试验证发现报 ORA-12537: Network Session: End of file 。注意 ALTER SYSTEM KILL SESSION 'xxx,xxx' IMMEDIATE; 也是同样的错误。

但是如果你使用 SQL*Plus 等工具(使用 SQL*Net 连接数据库),测试发现报 ORA-03113 :通信通道的文件结尾

ORA-12537: Network Session: End of file

查了一下官方文档关于 AzureFunction 连接数据库的相关知识,因为连接池缘故,数据库的会话一直处于 INACTIVE 状态,而当达到条件时(空闲超过 90 分钟),就被作业清理掉,而当后面应用访问时,由于连接池的相关会话被清理掉,从而报错。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Object-Oriented Design Heuristics

Object-Oriented Design Heuristics

Arthur J. Riel / Addison-Wesley Professional / 1996-05-10 / USD 64.99

Product Description Here is the first object-oriented development book to provide specific experience-based guidelines to help developers make the right design decisions. This book offers the next ......一起来看看 《Object-Oriented Design Heuristics》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具