当前位置:网站首页>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
边栏推荐
- Examples of how to use dates in Oracle
- What are the characteristics of the operation and maintenance management system
- 记一次JAP查询导致OOM的问题分析
- Kysl Haikang camera 8247 H9 ISAPI test
- 换个姿势做运维!GOPS 2022 · 深圳站精彩内容抢先看!
- 服装企业部署MES管理系统的五个原因
- LeetCode 77:组合
- fasterxml ToStringSerializerBase报错
- [2022 national tournament simulation] polygon - computational geometry, binary answer, multiplication
- 惯导标定国内外研究现状小结(删减版)
猜你喜欢

Mmdetection3d loads millimeter wave radar data

普通测试年薪15w,测试开发年薪30w+,二者差距在哪?

Redis入门完整教程:客户端管理

测试优惠券要怎么写测试用例?

Unity使用MaskableGraphic画一条带箭头的线

普通测试年薪15w,测试开发年薪30w+,二者差距在哪?

牛客编程题--必刷101之双指针篇

Digital scrolling increases effect

What management points should be paid attention to when implementing MES management system

Left value, right value
随机推荐
Es6中Promise的使用
QT Bluetooth: qbluetooth DeviceInfo
电气工程及其自动化
Data analysis from the perspective of control theory
QT common Concepts-1
INS/GPS组合导航类型简介
Redis getting started complete tutorial: common exceptions on the client
Remember the problem analysis of oom caused by a Jap query
The panel floating with the mouse in unity can adapt to the size of text content
MySQL - common functions - string functions
Utilisation de la promesse dans es6
测试优惠券要怎么写测试用例?
Electrical engineering and automation
Dotconnect for DB2 Data Provider
Niuke programming problem -- double pointer of 101 must be brushed
Andrews - multimedia programming
Leetcode 77: combination
Oracle中日期的使用方法实例
Common fitting models and application methods of PCL
wzoi 1~200