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 分钟),就被作业清理掉,而当后面应用访问时,由于连接池的相关会话被清理掉,从而报错。


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

查看所有标签

猜你喜欢:

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

TensorFlow实战

TensorFlow实战

黄文坚、唐源 / 电子工业出版社 / 2017-2-1 / 79

Google近日发布了TensorFlow 1.0候选版,这个稳定版将是深度学习框架发展中的里程碑的一步。自TensorFlow于2015年底正式开源,距今已有一年多,这期间TensorFlow不断给人以惊喜,推出了分布式版本,服务框架TensorFlow Serving,可视化工具TensorFlow,上层封装TF.Learn,其他语言(Go、Java、Rust、Haskell)的绑定、Wind......一起来看看 《TensorFlow实战》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具