当前位置:网站首页>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
边栏推荐
- 2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
- 牛客编程题--必刷101之双指针篇
- CSDN summer camp course project analysis
- wireshark安装
- 记一次JAP查询导致OOM的问题分析
- Electrical engineering and automation
- Error in fasterxml tostringserializerbase
- Django database (SQLite) basic introductory tutorial
- Redis入门完整教程:RDB持久化
- Classify the features of pictures with full connection +softmax
猜你喜欢
Redis入门完整教程:复制原理
Redis入门完整教程:AOF持久化
软件测试——Jmeter接口测试之常用断言
Redis入門完整教程:問題定比特與優化
Google Earth engine (GEE) -- 1975 dataset of Landsat global land survey
MySQL is an optimization artifact to improve the efficiency of massive data query
PSINS中19维组合导航模块sinsgps详解(时间同步部分)
wireshark安装
Redis getting started complete tutorial: replication configuration
MySQL提升大量数据查询效率的优化神器
随机推荐
Qt蓝牙:QBluetoothDeviceInfo
Read fast RCNN in one article
What are the characteristics of the operation and maintenance management system
Babbitt | metauniverse daily must read: is IP authorization the way to break the circle of NFT? What are the difficulties? How should holder choose the cooperation platform
wzoi 1~200
新标杆!智慧化社会治理
换个姿势做运维!GOPS 2022 · 深圳站精彩内容抢先看!
Matlb| economic scheduling with energy storage, opportunity constraints and robust optimization
QPushButton-》函数精解
Difference and the difference between array and array structure and linked list
MySQL提升大量数据查询效率的优化神器
Redis入门完整教程:AOF持久化
Work of safety inspection
Kubernetes source code analysis (II) -- resource
The so-called consumer Internet only matches and connects industry information, and does not change the industry itself
Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!
PSINS中19维组合导航模块sinsgps详解(时间同步部分)
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?
Unity使用MaskableGraphic画一条带箭头的线
A complete tutorial for getting started with redis: AOF persistence