当前位置:网站首页>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
边栏推荐
猜你喜欢

QT Bluetooth: qbluetooth DeviceInfo

你不可不知道的Selenium 8种元素定位方法,简单且实用
Django database (SQLite) basic introductory tutorial

Analysis of USB network card sending and receiving data

The panel floating with the mouse in unity can adapt to the size of text content

Digital scrolling increases effect

Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (time synchronization part)

Kysl Haikang camera 8247 H9 ISAPI test

Form validation of uniapp
MySQL is an optimization artifact to improve the efficiency of massive data query
随机推荐
代码调试core-踩内存
Redis入门完整教程:AOF持久化
A complete tutorial for getting started with redis: AOF persistence
Redis getting started complete tutorial: common exceptions on the client
Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (time synchronization part)
wireshark安装
Install redis from zero
商城商品的知识图谱构建
Cloud Mail . NET Edition
Cglib agent in agent mode
Difference and the difference between array and array structure and linked list
LeetCode 77:组合
Unity uses maskablegraphic to draw a line with an arrow
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
简单冒泡排序
MySQL - common functions - string functions
dotConnect for DB2数据提供者
Es6中Promise的使用
Hash table and full comments
Unity custom webgl packaging template