Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oajVI-0002wz-Hb for pgsql-general@arkaria.postgresql.org; Tue, 20 Sep 2022 20:06:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oajVG-0006i1-77 for pgsql-general@arkaria.postgresql.org; Tue, 20 Sep 2022 20:05:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oajVF-0006hk-ME for pgsql-general@lists.postgresql.org; Tue, 20 Sep 2022 20:05:57 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oajVC-0002EZ-FK for pgsql-general@lists.postgresql.org; Tue, 20 Sep 2022 20:05:56 +0000 Received: by mail-pj1-x1033.google.com with SMTP id s14-20020a17090a6e4e00b0020057c70943so11961581pjm.1 for ; Tue, 20 Sep 2022 13:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date; bh=hC22ATpoy8Q0ne6/OF6ttjNEhM1B85RVdRp46jEqgZc=; b=aImPNSeeIc+R9qt1/G6YOO+nE50+r8hJF86farswjT+zei6+y3AZu6hF4CIXcO5a96 63Ug2V+/A2DdSaomr0D5eE/h0jJ08xLOxOEny1966zHypBIx8zlJpe2Nvu3w/X3KeHAo 6YrVrsKY+y+NQ674Z+fCATMD+rqDBSA343zxAFfkiI2jWomAGtaUUk45jr+Gqu0VOD2f 0pSRPkcPAi7aYVcvOijwW2r7XE0zMrkIWawzjBUDveGBvl1w56/DXCE68BjTEk7iwiFY yeCXm/ontIiwEuTduJiFC2SXcCFNdq+5a5mxjXQb3tkN6FAU/jTNOCv8zQVijJdkRJGO Rzyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=hC22ATpoy8Q0ne6/OF6ttjNEhM1B85RVdRp46jEqgZc=; b=nXI87QFUnV3XuwShiiMVBDUXWoAOh/zDH/WldPXU+1dF43/0zCja6Kk1xLnO1CZLXb yaDefo1GTNQsgeJsjjhNVdKd9OX66duTjn+H85KtAylIX1+XP//PPmmUe/FpJPrEIkBp tyYe7dsnXa7mXZ2kALEVUZp060tDBPYGysL97tQ597iYS5OS3+btAPZi38t2T9I6winH hGPIE8fJhAocVwJ5BRgvJu7cbgmxUEwfY/BX3K7zCbK+AKKrOUoHmrJOzc4hCi2FGSar F9zDTXVpGe2ewLcPM8RJIFI9xqIRwb40uuEh9oxSlBsBzlgNu7FUscz8ZG9027p7BQe/ E6Tg== X-Gm-Message-State: ACrzQf35X1HlKmvAbu5lZaxbda2sa8jKoFuQ5frfouNqWQWTkpzWuG34 /4o4vH+6xV47Vb+258PUGqT/xIFwagU= X-Google-Smtp-Source: AMsMyM6ePUECIPlukc40V+guMb1wdB9+xtWFKkMdkr3ytU62pRC36SbedYqiJNtxb56iRVtWNewvvw== X-Received: by 2002:a17:90b:110a:b0:203:6f0c:9b66 with SMTP id gi10-20020a17090b110a00b002036f0c9b66mr5672780pjb.104.1663704352724; Tue, 20 Sep 2022 13:05:52 -0700 (PDT) Received: from ?IPV6:2601:681:5a00:f790:78ef:ad24:9581:ed37? ([2601:681:5a00:f790:78ef:ad24:9581:ed37]) by smtp.gmail.com with ESMTPSA id d6-20020a170903230600b00176d347e9a7sm275803plh.233.2022.09.20.13.05.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 13:05:52 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------qRIu00wOU8hEEyYlUjXz2zlp" Message-ID: <58e221af-b764-61ae-6337-a2aa2fead8a2@gmail.com> Date: Tue, 20 Sep 2022 14:05:46 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-CA To: "pgsql-generallists.postgresql.org" From: Rob Sargent Subject: tcp settings List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------qRIu00wOU8hEEyYlUjXz2zlp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I'm wondering if there's a disconnect between my servers postgresql.conf and the system tcp settings? Are the config names supposed to match a file in /proc/sys/net/ipv4? In postgres 14 install's postgresql.conf on centos 7: # - TCP settings - # see "man tcp" for details #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 #tcp_user_timeout = 0                   # TCP_USER_TIMEOUT, in milliseconds; # 0 selects the system default #client_connection_check_interval = 0   # time between checks for client # disconnection while running queries; # 0 for never and in the /proc/sys/net/ipv4 I see no "keepalives" plural. tcp_abort_on_overflow tcp_fastopen_key           tcp_min_snd_mss tcp_slow_start_after_idle tcp_adv_win_scale                 tcp_fin_timeout tcp_min_tso_segs          tcp_stdurg tcp_allowed_congestion_control    tcp_frto tcp_moderate_rcvbuf       tcp_synack_retries tcp_app_win                       tcp_invalid_ratelimit tcp_mtu_probing           tcp_syncookies tcp_autocorking                   tcp_keepalive_intvl(75) tcp_no_metrics_save       tcp_syn_retries tcp_available_congestion_control  tcp_keepalive_probes(9) tcp_notsent_lowat         tcp_thin_dupack tcp_base_mss                      tcp_keepalive_time(7200) tcp_orphan_retries        tcp_thin_linear_timeouts tcp_challenge_ack_limit           tcp_limit_output_bytes tcp_reordering            tcp_timestamps tcp_congestion_control            tcp_low_latency tcp_retrans_collapse      tcp_tso_win_divisor tcp_dsack                         tcp_max_orphans tcp_retries1              tcp_tw_recycle tcp_early_retrans                 tcp_max_ssthresh tcp_retries2              tcp_tw_reuse tcp_ecn                           tcp_max_syn_backlog tcp_rfc1337               tcp_window_scaling tcp_fack                          tcp_max_tw_buckets tcp_rmem                  tcp_wmem tcp_fastopen                      tcp_mem tcp_sack                  tcp_workaround_signed_windows My issue is that psql is timing out with "SSL SYSCALL error: Connection timed out".  The TCP defaults for keepalive look fine to me but not what I'm experiencing.  I have PGCONNECT_TIMEOUT=0 in my env for psql. --------------qRIu00wOU8hEEyYlUjXz2zlp Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm wondering if there's a disconnect between my servers postgresql.conf and the system tcp settings? Are the config names supposed to match a file in /proc/sys/net/ipv4?


In postgres 14 install's postgresql.conf on centos 7:

# - TCP settings -
# see "man tcp" for details

#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
#tcp_user_timeout = 0                   # TCP_USER_TIMEOUT, in milliseconds;
                                        # 0 selects the system default

#client_connection_check_interval = 0   # time between checks for client
                                        # disconnection while running queries;
                                        # 0 for never
and in the /proc/sys/net/ipv4 I see no "keepalives" plural.
tcp_abort_on_overflow             tcp_fastopen_key           tcp_min_snd_mss           tcp_slow_start_after_idle    
tcp_adv_win_scale                 tcp_fin_timeout            tcp_min_tso_segs          tcp_stdurg                   
tcp_allowed_congestion_control    tcp_frto                   tcp_moderate_rcvbuf       tcp_synack_retries                 
tcp_app_win                       tcp_invalid_ratelimit      tcp_mtu_probing           tcp_syncookies                     
tcp_autocorking                   tcp_keepalive_intvl(75)    tcp_no_metrics_save       tcp_syn_retries                    
tcp_available_congestion_control  tcp_keepalive_probes(9)    tcp_notsent_lowat         tcp_thin_dupack                    
tcp_base_mss                      tcp_keepalive_time(7200)   tcp_orphan_retries        tcp_thin_linear_timeouts           
tcp_challenge_ack_limit           tcp_limit_output_bytes     tcp_reordering            tcp_timestamps                     
tcp_congestion_control            tcp_low_latency            tcp_retrans_collapse      tcp_tso_win_divisor           
tcp_dsack                         tcp_max_orphans            tcp_retries1              tcp_tw_recycle                      
tcp_early_retrans                 tcp_max_ssthresh           tcp_retries2              tcp_tw_reuse                  
tcp_ecn                           tcp_max_syn_backlog        tcp_rfc1337               tcp_window_scaling            
tcp_fack                          tcp_max_tw_buckets         tcp_rmem                  tcp_wmem              
tcp_fastopen                      tcp_mem                    tcp_sack                  tcp_workaround_signed_windows


My issue is that psql is timing out with "SSL SYSCALL error: Connection timed out".  The TCP defaults for keepalive look fine to me but not what I'm experiencing.  I have PGCONNECT_TIMEOUT=0 in my env for psql.
--------------qRIu00wOU8hEEyYlUjXz2zlp--