Processing of PostgreSQL remote connection interrupts

Source: Internet
Author: User
When connecting to a remote server PostgreSQL on a network, inactivity will automatically disconnect for a longer period of time and is not conducive to operation. Figured out, this problem was resolved when the following network configuration was used on the server. #man 7 TCP net.ipv4.tcp_keepalive_time = 600net.ipv4.tcp_keepalive_probes = 3NET.IPV4.TCP_KEEPALIVE_INTVL = 15 also pay attention to post Gresql.conf in the following settings: #tcp_keepalives_idle = 0 # Tcp_keepidle, in seconds; 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;0 selects the system default
#tcp_keepalives_count = 0 # tcp_keepcnt;0 Selects the system default is DEBIAN7, the default timeout setting is too long and the network condition is poor, which leads to this Problem. The idea of this configuration is to have the PG emit probe packets more frequently to keep the TCP connection.

Processing of PostgreSQL remote connection interrupts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.