当前位置:网站首页>The database uses PSQL and JDBC to connect remotely and disconnect automatically from time to time
The database uses PSQL and JDBC to connect remotely and disconnect automatically from time to time
2022-07-26 17:50:00 【51CTO】
Henkel database
Catalog
Environmental Science
symptoms
Question why
Solution
Environmental Science
system platform :Linux x86-64 Red Hat Enterprise Linux 7,Linux x86-64 Red Hat Enterprise Linux 6, Galaxy Unicorn U system (CPU Feiteng )4
edition :4.5
symptoms
Hangao database is in use psql Tools and jdbc When making a remote connection , Report an error after a certain time - Fatal error :terminating connection due to client no input timeout.
Check safety parameters ,hg_clientnoinput = 0;
Question why
operating system TCP The relevant parameters are set incorrectly , The database follows the operating system configuration , Lead to TCP The survival mechanism has not taken effect .
Solution
After the database is configured as follows , Problem solving :
Parameter description :
-
tcp_keepalives_idle (integer) Specify that the operating system sends a TCP keepalive The total amount of time without network activity after the message . If you specify a value without a unit , In seconds . value 0( The default value is ) Indicates that the default value of the operating system is selected . Specify how many seconds to pass after inactivity TCP Send a keepalive news . 0 Value means the default value is used . This parameter is only supported TCP_KEEPIDLE Or equivalent socket option system or Windows You can only use . On other systems , It must be zero . Through Unix In the session of domain socket connection , This parameter is ignored and always read as zero . -
tcp_keepalives_interval (integer)
Specify the receipt that is not confirmed by the client TCP keepalive The length of time the message should be retransmitted . If you specify a value without a unit , In seconds . value 0( The default value is ) Indicates that the default value of the operating system is selected . This parameter is only supported TCP_KEEPINTVL Or equivalent socket option system or Windows You can only use . On other systems , It has to be zero . Through Unix In the session of domain socket connection , This parameter is ignored and always read as zero . -
tcp_keepalives_count (integer) Specifies that the connection from the server to the client can be lost before it is considered disconnected TCP keepalive The number of messages . value 0( The default value is ) Indicates that the default value of the operating system is selected . This parameter is only supported TCP_KEEPCNT Or equivalent socket option . On other systems , It has to be zero . Through Unix In the session of domain socket connection , This parameter is ignored and always read as zero . -
tcp_user_timeout (integer) Specifies that the transmitted data is in TCP The amount of time that a connection can remain in an unconfirmed state before it is forcibly closed . If you specify a value without a unit , In milliseconds . value 0( The default value is ) Indicates that the default value of the operating system is selected . This parameter is only supported TCP_USER_TIMEOUT Is supported on the system ; On other systems , It must be zero . Through Unix-domain In a socket connected session , This parameter will be ignored and always read as zero .
Methods of configuration information related to the server :
边栏推荐
- (24)Blender源码分析之顶层菜单显示代码分析
- Use replace regexp to add a sequence number at the beginning of a line
- 机器视觉在服务机器人中的应用
- [machine learning] principle and code of mean shift
- Use dired to move files quickly
- the loss outweighs the gain! Doctors cheated 2.1 million yuan and masters cheated 30000 yuan of talent subsidies, all of which were sentenced!
- Tupu 3D visual national style design | collision between technology and culture "cool" spark“
- Come on developer! Not only for the 200000 bonus, try the best "building blocks" for a brainstorming!
- 【元宇宙欧米说】剖析 Web3 风险挑战,构筑 Web3 生态安全
- AI遮天传 DL-回归与分类
猜你喜欢

JS closure simulates private variable interview questions and immediately executes function Iife

图解用户登录验证流程,写得太好了!

AI遮天传 DL-回归与分类

Comparison between agile development and Devops

【欧米读书会】谈谈元宇宙中的创作者经济:无限次元

Pay attention to the traffic safety warning of tourism passenger transport issued by the Ministry of public security
![Cloud rendering volume cloud [theoretical basis and implementation scheme]](/img/38/0e97d6f015f3cb51e872a8d3ce584a.png)
Cloud rendering volume cloud [theoretical basis and implementation scheme]

来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!...

(25) top level menu of blender source code analysis blender menu

树形dp问题
随机推荐
【集训Day3】Reconstruction of roads
JS function scope variables declare that the variables that promote the scope chain without VaR are global variables
Redisdesktopmanager removes the upgrade prompt
Machine learning - what are machine learning, supervised learning, and unsupervised learning
AI遮天传 DL-回归与分类
Asemi rectifier bridge kbpc3510, kbpc3510 package, kbpc3510 application
How to set IP for layer 2 management switches
【集训Day2】cinema ticket
The latest interface of Taobao / tmall keyword search
重磅!《2022中国开源发展蓝皮书》正式发布
Is it safe to open an account online now? Who do you want to open a stock account?
国际大咖 VS 本土开源新星 | ApacheCon Asia 主题演讲议程全览
【元宇宙欧米说】剖析 Web3 风险挑战,构筑 Web3 生态安全
[300 opencv routines] 240. Shi Tomas corner detection in opencv
图的遍历的定义以及深度优先搜索和广度优先搜索(一)
#夏日挑战赛# OpenHarmony基于JS实现的贪吃蛇
【模板】线段树 1
如何组装一个注册中心?
【集训Day2】Sculpture
Mondriaans's dream (state compression DP)