当前位置:网站首页>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-29 07:45:00 【Ma Xiaoxiao】
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 :
# The default values of the following parameters are 0, Indicates the configuration of the continuation server .
tcp_keepalives_idle = '60'
tcp_keepalives_interval = '20'
tcp_keepalives_count = '10'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 :
[[email protected] ~]# cat /proc/sys/net/ipv4/tcp_keepalive_time
[[email protected] ~]# cat /proc/sys/net/ipv4/tcp_keepalive_intvl
[[email protected] ~]# cat /proc/sys/net/ipv4/tcp_keepalive_probes边栏推荐
- Prepare esp32 environment
- 多线程购物
- [summer daily question] Luogu p6336 [coci2007-2008 2] bijele
- 新生代公链再攻「不可能三角」
- Cross domain problems when downloading webapi interface files
- [summer daily question] Luogu p7760 [coci2016-2017 5] tuna
- LANDSCAPE
- Monitor the bottom button of page scrolling position positioning (including the solution that page initialization positioning does not take effect on mouse sliding)
- Amaze UI 图标查询
- 国内数字藏品的乱象与未来
猜你喜欢

Mutationobserver document learning

美智光电IPO被终止:年营收9.26亿 何享健为实控人
What are the common error types and solutions of black box testing?
What are the principles and methods of implementing functional automation testing?

Zero technology is deeply involved in the development of privacy computing financial scenario standards of the ICT Institute

Chaos and future of domestic digital collections

OA项目之会议通知(查询&是否参会&反馈详情)

Go, how to become a gopher, and find work related to go language in 7 days, Part 1

技术分享| 快对讲综合调度系统

LANDSCAPE
随机推荐
What are the common error types and solutions of black box testing?
【FPGA教程案例42】图像案例2——通过verilog实现图像二值化处理,通过MATLAB进行辅助验证
Use custom annotations to verify the size of the list
Pytest set (7) - parameterization
电子元器件贸易企业如何借助ERP系统,解决仓库管理难题?
String class
RoBERTa:A Robustly Optimized BERT Pretraining Approach
gin abort不能阻止后续代码的问题
Zip gzip tar compression Advanced Edition
监听页面滚动位置定位底部按钮(包含页面初始化定位不对鼠标滑动生效的解决方案)
【暑期每日一题】洛谷 P6336 [COCI2007-2008#2] BIJELE
What is the use of chat robots? What type? After reading these, you will understand!
MySQL 45 讲 | 07 行锁功过:怎么减少行锁对性能的影响?
330. Complete the array as required
Dilworth theorem
log4qt内存泄露问题,heob内存检测工具的使用
MySQL 45 | 08 is the transaction isolated or not?
As long as flutter is data, it will be judged null
Ionicons icon Encyclopedia
Credit card shopping points