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 1lMdmH-00031z-PO for pgsql-general@arkaria.postgresql.org; Wed, 17 Mar 2021 21:32:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMdmG-00009T-OA for pgsql-general@arkaria.postgresql.org; Wed, 17 Mar 2021 21:32:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMdmG-00009M-Ga for pgsql-general@lists.postgresql.org; Wed, 17 Mar 2021 21:32:28 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lMdmE-0000Bi-Kt for pgsql-general@lists.postgresql.org; Wed, 17 Mar 2021 21:32:28 +0000 Received: by mail-qt1-x833.google.com with SMTP id s2so2569335qtx.10 for ; Wed, 17 Mar 2021 14:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=L1NQh8QS9fhvyyOUKzGFvqf0/Szzke75ARig/cAlqug=; b=vOukltpmso027asZAtL21wv//YHaA+XD/vkJOlDX0wCd6CKP7k1XzY+boo3+DDfkQW wOekAVYG0SvcAKDZRy3qoj+BseiRVo1UGKWgPpeS8Lj3CIYTgMNomWsY/7X61WRCpo9X /xAwV9/96qUOxxzCAuKcFnJmYoXhKT2nj16893iEv6xbtw5WLCUCzVYIYfbPHZzUKwUV 6tbHvTl5QqMKVLuxYisO9kPJLca621kmPHnTHLWo6XfKHqGctA22BViLD4A5LN3I9eBD w06UYo2PxtefehJYFuMbByFT1Rsjh9BithYWWzHPFwCgV7xOQN3FCz0G/GzjvG2hn/7u /8lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=L1NQh8QS9fhvyyOUKzGFvqf0/Szzke75ARig/cAlqug=; b=L9TiYbJoFPFQOATLPQRwFbzv+OTfXRGslLJv+pW01/4XhvndbuqG8MBsie3pOZE/da WNk8x4hl1Z6kG0TzYoRa8cXnSMrfqoe1Jl2e+W8CG5H0fvrbKJun50IVSqJKv2iTX2S/ PdPHVXUP1H/wrUEyidKTWkmQfc9LMixhTXzyeYT2n1QJe8wafac2FZwgWQMQiZU+2ezK VjnjRBPdj0dDT906tqKcGbJzs7jcGq/cUw7l8+5q0nGu15OSoyIQNDqYd6RKl1FrEH0x /HJ+a94+334VELpoQ3Ypfk8RYXARpsgweE5kksvj8fkS+rpeG/q79uzrZIazEWtc6G8g 5+KA== X-Gm-Message-State: AOAM531wsAcXFIQoPygeLrKWeLoOMHfwQsA+s0Br/o4vP1ldt3Ylqh7E 2zFBhmApGQahXNQmYLKySZpG/cCESdUk6g== X-Google-Smtp-Source: ABdhPJwBOxONByP8zKOCKnD/6aUcAvz6nhTHYKau5aNgBC6gjVxCNJi9kF/k8ZXaDjmmhmWPgo9/6g== X-Received: by 2002:ac8:6888:: with SMTP id m8mr980924qtq.71.1616016744674; Wed, 17 Mar 2021 14:32:24 -0700 (PDT) Received: from [10.5.132.226] ([190.216.82.155]) by smtp.gmail.com with ESMTPSA id q65sm202495qkb.51.2021.03.17.14.32.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Mar 2021 14:32:24 -0700 (PDT) From: Diego X-Google-Original-From: Diego Subject: Re: how to troubleshoot: FATAL: canceling authentication due to timeout To: pgsql-general@lists.postgresql.org References: Message-ID: <47b6c0f6-0831-3b08-b29e-abe5ae993d9b@gmail.com> Date: Wed, 17 Mar 2021 18:32:22 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------8893DB61D58ABBA3DDA4C09D" Content-Language: en-US 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. --------------8893DB61D58ABBA3DDA4C09D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit hi! What you see in the log files of CentOS ( /var/log ) ? i On 17/03/2021 16:00, Marc wrote: > hi all, > > We are facing a problem with a user login into database. It happens when there is large load and only from time to time. > Once we get this error, the user becomes unusable until database is restarted. (That user is being used by multiple instances of the same application, it also happens using dedicated users for each application, resulting on one of those users being locked out, the rest keep working fine) > > The errors is as follows: > LOG: pam_authenticate failed: Authentication failure > FATAL: canceling authentication due to timeout > > Our setup: > 3 nodes cluster > - Centos 7 > - Streaming replication in place (async) > - WAL shipped to an external location > - pooling done at client side > - Centos joined to an Active Directory domain > - Authentication is using PAM module > > User is completely fine in AD side since i can use it to login to a standby DB. > I guess there must be a lock that prevents this user to do the first authentication step, but no idea how to find it. I’ve tried common queries to find locks but I can’t see anything relevant. > > I would appreciate if someone could point me to the right direction! > > Thanks a lot! > Marc. > > > --------------8893DB61D58ABBA3DDA4C09D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

hi!

What you see in the log files of CentOS ( /var/log ) ?
i


On 17/03/2021 16:00, Marc wrote:
hi all,

We are facing a problem with a user login into database. It happens when there is large load and only from time to time.
Once we get this error, the user becomes unusable until database is restarted. (That user is being used by multiple instances of the same application, it also happens using dedicated users for each application, resulting on one of those users being locked out, the rest keep working fine)

The errors is as follows:
LOG: pam_authenticate failed: Authentication failure
FATAL: canceling authentication due to timeout

Our setup:
3 nodes cluster
- Centos 7
- Streaming replication in place (async)
- WAL shipped to an external location
- pooling done at client side
- Centos joined to an Active Directory domain
- Authentication is using PAM module

User is completely fine in AD side since i can use it to login to a standby DB.
I guess there must be a lock that prevents this user to do the first authentication step, but no idea how to find it. I’ve tried common queries to find locks but I can’t see anything relevant.

I would appreciate if someone could point me to the right direction!

Thanks a lot!
Marc.



--------------8893DB61D58ABBA3DDA4C09D--