当前位置:网站首页>Oracle connection pool is not used for a long time, and the connection fails
Oracle connection pool is not used for a long time, and the connection fails
2022-07-07 03:01:00 【Proud cat sauce】
background :
I use python Oracle.SessionPool() Encapsulates the connection pool . After starting the project , It can be used for a period of time ,
Don't use it after a few hours , Trigger again , The connection of the connection pool fails .
reason :
The practical examples I encountered are as follows :
Web There is a security firewall between the server and the database , This firewall will check the connection regularly , If a connection takes a long time (30 minute ) There's no data flowing through , Will be shut down . This closure makes it possible to detect that the connection is still open , But it can't be carried out sql sentence . But if the connection has data flow all the time , Will not be closed .
After setting the periodic detection , It solves this problem better .
Oracle There is such a setting in the implementation of , That is, give a test statement to test the database connection . Commonly used select 1 from dual . Another setting is how often to detect . General Settings 15 minute .
in other words Oracle Implementation method of , This statement will be automatically and regularly used to detect the connection of the database , Once a connection failure is detected , Close the connection and re-establish the connection .
Therefore, I suggest that the landlord can consider such a mechanism . After all, the network connection is completely possible to be disconnected .
Specific solutions , We should explore by ourselves , I'm not done .
Original address :
Connection pooling issues , The connection will not work after a long time .-CSDN Forum
边栏推荐
- The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
- Redis入门完整教程:复制拓扑
- Redis入门完整教程:客户端常见异常
- Redis getting started complete tutorial: replication topology
- The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
- Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (filtering part)
- MySQL is an optimization artifact to improve the efficiency of massive data query
- 如何分析粉丝兴趣?
- [node learning notes] the chokidar module realizes file monitoring
- Dotconnect for DB2 Data Provider
猜你喜欢
Redis getting started complete tutorial: client management
软件测试——Jmeter接口测试之常用断言
HAVE FUN | “飞船计划”活动最新进展
The 8 element positioning methods of selenium that you have to know are simple and practical
How-PIL-to-Tensor
哈希表及完整注释
Digital scrolling increases effect
C language exercises_ one
Unity使用MaskableGraphic画一条带箭头的线
Niuke programming problem -- double pointer of 101 must be brushed
随机推荐
ERROR: Could not find a version that satisfies the requirement xxxxx (from versions: none)解决办法
Read fast RCNN in one article
服装企业部署MES管理系统的五个原因
Qt蓝牙:QBluetoothDeviceInfo
Digital scrolling increases effect
c语言(字符串)如何把字符串中某个指定的字符删除?
CDB PDB user rights management
Data analysis from the perspective of control theory
Es6中Promise的使用
QPushButton-》函数精解
Summary of basic debugging steps of S120 driver
QT Bluetooth: qbluetooth DeviceInfo
Unity custom webgl packaging template
Cloud Mail . NET Edition
The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
[2022 national tournament simulation] polygon - computational geometry, binary answer, multiplication
Matlb| economic scheduling with energy storage, opportunity constraints and robust optimization
A complete tutorial for getting started with redis: AOF persistence
How to write test cases for test coupons?
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!