最近开发组同事使用Azure的Function 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这个错误,如下所示:

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

ORA-12537: Network Session: End of file的更多相关文章

  1. 阿里云centos安装oracle

    目录 阿里云centos安装oracle 阿里云默认没有swap分区,oracle安装需要 安装Oracle所需的依赖包 创建用户和组 关闭SELINUX(阿里云缺省关闭) 开始安装 使用" ...

  2. ORA-19566: exceeded limit of 0 corrupt blocks for file E:\xxxx\<datafilename>.ORA.

    How to Format Corrupted Block Not Part of Any Segment (Doc ID 336133.1) To BottomTo Bottom In this D ...

  3. 【Azure 存储服务】如何把开启NFS 3.0协议的Azure Blob挂载在Linux VM中呢?(NFS: Network File System 网络文件系统)

    问题描述 如何把开启NFS协议的Azure Blob挂载到Linux虚拟机中呢? [答案]:可以使用 NFS 3.0 协议从基于 Linux 的 Azure 虚拟机 (VM) 或在本地运行的 Linu ...

  4. How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1)

    APPLIES TO: Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12. ...

  5. ORACLE RAC 下非缺省端口监听配置(listener.ora tnsnames.ora)

    不论是单实例还是RAC,对于非缺省端口下(1521)的监听器,pmon进程不会将service/instance注册到监听器,即不会实现动态注册.与单实例相同,RAC非缺省端口的监听器也是通过设置参数 ...

  6. MatterTrack Route Of Network Traffic :: Matter

    Python 1.1 基础 while语句 字符串边缘填充 列出文件夹中的指定文件类型 All Combinations For A List Of Objects Apply Operations ...

  7. ORA-01336: specified dictionary file cannot be opened

    这篇介绍使用Logminer时遇到ORA-01336: specified dictionary file cannot be opened错误的各种场景 1:dictionary_location参 ...

  8. 【Debian】非法关机后无法联网 connect: network is unreachable

    某一天,突然发现无法ssh登录虚拟机内的debian系统,一直认为是ssh的问题,然后无意间ping了ping百度,发现原来是debian系统没有联网....囧 首先,是虚拟机的网络设置检查. 打开V ...

  9. Linux Found a swap file by the name filename

    在Linux中使用vi命令编辑mysql_backup.sh时遇到下面提示信息 E325: ATTENTION Found a swap file by the name ".mysql_b ...

随机推荐

  1. [Swift]LeetCode421. 数组中两个数的最大异或值 | Maximum XOR of Two Numbers in an Array

    Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. Find the maximum re ...

  2. [Swift]LeetCode542. 01 矩阵 | 01 Matrix

    Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance b ...

  3. [Swift]LeetCode680. 验证回文字符串 Ⅱ | Valid Palindrome II

    Given a non-empty string s, you may delete at most one character. Judge whether you can make it a pa ...

  4. Java接口实现传参

    package com.gezhi.interfaces;/** * 新建一个dog类实现接口livingable(狗吃和上厕所都是与生俱来的不应该写成接口) * @author square 凉 * ...

  5. Kubernetes因限制内存配置引发的错误

    今天对一个pod进行内存资源调整后, 一直卡在ContainerCreating的状态, 执行describe命令查看该 Pod 详细信息后发现如下 . [root@master-01 ~]# kub ...

  6. Python—day18 dandom、shutil、shelve、系统标准流、logging

    一.dandom模块 (0, 1) 小数:random.random() [1, 10] 整数:random.randint(1, 10) [1, 10) 整数:random.randrange(1, ...

  7. 基于 Redis 的分布式锁

    前言 分布式锁在分布式应用中应用广泛,想要搞懂一个新事物首先得了解它的由来,这样才能更加的理解甚至可以举一反三. 首先谈到分布式锁自然也就联想到分布式应用. 在我们将应用拆分为分布式应用之前的单机系统 ...

  8. java多线程(5)---ThreadPoolExecutor

    ThreadPoolExecutor 官方API解释线程池的好处: (1)通过重用线程池中的线程,来减少每个线程创建和销毁的性能开销. (2)对线程进行一些维护和管理,比如定时开始,周期执行,并发数控 ...

  9. Shader 入门笔记(一) 如何学习shader

    本笔记,是根据自己学习shader的笔记,主要是参照冯乐乐的<Shader 入门精要> 和游戏蛮牛shaderLad视频 和网上一些博客. 为啥要学习这个呐? 自己其实之前学过一段时间的s ...

  10. 痞子衡嵌入式:飞思卡尔Kinetis系列MCU启动那些事(1)- KBOOT架构

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是飞思卡尔Kinetis系列MCU的KBOOT架构. Bootloader是嵌入式MCU开发里很常见的一种专用的应用程序,在一个没有Boo ...