当前位置:网站首页>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
边栏推荐
- Kubernetes source code analysis (II) -- resource
- Safety delivery engineer
- 凌云出海记 | 易点天下&华为云:推动中国电商企业品牌全球化
- MATLB|具有储能的经济调度及机会约束和鲁棒优化
- 惯导标定国内外研究现状小结(删减版)
- 如何分析粉丝兴趣?
- 密码学系列之:在线证书状态协议OCSP详解
- C language exercises_ one
- 数论 --- 快速幂、快速幂求逆元
- Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!
猜你喜欢

How-PIL-to-Tensor

PSINS中19维组合导航模块sinsgps详解(时间同步部分)

Redis introduction complete tutorial: replication principle

Electrical engineering and automation

Redis getting started complete tutorial: replication configuration

Remember the problem analysis of oom caused by a Jap query

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?

QT Bluetooth: qbluetooth DeviceInfo

数论 --- 快速幂、快速幂求逆元

Es6中Promise的使用
随机推荐
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?
Code debugging core step memory
【2022国赛模拟】多边形——计算几何、二分答案、倍增
widerperson数据集转化为YOLO格式
Wireshark installation
wzoi 1~200
Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!
Redis getting started complete tutorial: client management
MES管理系统的应用和好处有哪些
你不可不知道的Selenium 8种元素定位方法,简单且实用
Contribution of Writing Series
Redis入门完整教程:复制配置
Code line breaking problem of untiy text box
商城商品的知识图谱构建
Redis入门完整教程:问题定位与优化
Electrical engineering and automation
uniapp的表单验证
Remember the problem analysis of oom caused by a Jap query
[secretly kill little partner pytorch20 days] - [Day1] - [example of structured data modeling process]
Kubernetes source code analysis (II) -- resource