Обсуждение: BUG #18428: Connection broken but DB service still alive.

Поиск
Список
Период
Сортировка

BUG #18428: Connection broken but DB service still alive.

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      18428
Logged by:          致均(Harry) 盧
Email address:      harry@linktech.com.tw
PostgreSQL version: 14.7
Operating system:   Windows
Description:

As title,we have a web application connecting with PostgreSQL 14.7.1 for one
year ago.
Recently,the connection start to broken,after IT check,the DB service still
alive.

There is the log below:

2024-04-06 13:54:53.868 CST [4840] LOG:  received fast shutdown request
2024-04-06 13:54:53.888 CST [6552] ERROR:  canceling statement due to user
request
2024-04-06 13:54:53.888 CST [4840] LOG:  aborting any active transactions
2024-04-06 13:54:53.890 CST [9620] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.890 CST [9140] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.891 CST [6200] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.891 CST [1352] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.892 CST [1052] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.892 CST [4944] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.893 CST [2716] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.893 CST [9632] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.893 CST [10088] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.893 CST [8364] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.894 CST [2508] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.894 CST [4492] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.891 CST [5956] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.892 CST [8720] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [9180] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [4388] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [8140] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [1524] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [10336] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [8224] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [4484] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [10596] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [4984] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.895 CST [7536] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [8248] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [10660] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [3516] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [8736] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [4616] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [10888] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [6400] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [8684] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [3296] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [11172] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [7144] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [10248] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [6268] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [5148] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [4228] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [10528] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.897 CST [3256] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [1884] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.896 CST [10932] FATAL:  terminating connection due to
administrator command
2024-04-06 13:54:53.992 CST [4840] LOG:  background worker "logical
replication launcher" (PID 6552) exited with exit code 1
2024-04-06 13:54:54.212 CST [4960] FATAL:  the database system is shutting
down
2024-04-06 13:54:54.260 CST [6504] LOG:  shutting down
2024-04-06 13:54:54.368 CST [4840] LOG:  database system is shut down
    
2024-04-06 14:39:44.884 CST [12056] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.885 CST [7464] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 21:54:19.193 CST [5512] LOG:  starting PostgreSQL 14.7, compiled
by Visual C++ build 1914, 64-bit
2024-04-06 21:54:19.195 CST [5512] LOG:  listening on IPv6 address "::",
port 5432
2024-04-06 21:54:19.195 CST [5512] LOG:  listening on IPv4 address
"0.0.0.0", port 5432
2024-04-06 21:54:19.697 CST [6668] LOG:  database system was shut down at
2024-04-06 13:54:54 CST
2024-04-06 21:54:19.750 CST [5512] LOG:  database system is ready to accept
connections
2024-04-06 21:55:15.782 CST [6812] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 21:55:15.784 CST [4684] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 21:55:15.786 CST [6652] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.824 CST [11996] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.835 CST [3664] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.839 CST [5452] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.841 CST [3900] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.842 CST [7816] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.843 CST [11692] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.854 CST [11648] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.857 CST [212] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.859 CST [2812] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.860 CST [2300] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.863 CST [7820] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.863 CST [9060] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.863 CST [10676] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.864 CST [2288] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.864 CST [2836] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.866 CST [11816] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.868 CST [7196] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.882 CST [1368] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.884 CST [12056] LOG:  could not receive data from
client: An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:39:44.885 CST [7464] LOG:  could not receive data from client:
An existing connection was forcibly closed by the remote host.

    
2024-04-06 14:40:02.951 CST [5512] LOG:  received fast shutdown request
2024-04-06 14:40:02.966 CST [5512] LOG:  aborting any active transactions
2024-04-06 14:40:02.966 CST [8080] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.967 CST [8048] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.967 CST [8016] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.967 CST [7980] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.968 CST [7860] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.968 CST [7788] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.968 CST [7732] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.968 CST [7684] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.968 CST [7596] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.969 CST [7504] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.969 CST [7436] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.970 CST [7388] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.970 CST [7232] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.970 CST [7316] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.970 CST [2572] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.970 CST [7140] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.971 CST [3704] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.971 CST [6852] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.971 CST [6516] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:02.971 CST [6480] FATAL:  terminating connection due to
administrator command
2024-04-06 14:40:03.007 CST [5512] LOG:  background worker "logical
replication launcher" (PID 7116) exited with exit code 1
2024-04-06 14:40:03.028 CST [7072] LOG:  shutting down
2024-04-06 14:40:03.231 CST [5512] LOG:  database system is shut down


Re: BUG #18428: Connection broken but DB service still alive.

От
Tom Lane
Дата:
PG Bug reporting form <noreply@postgresql.org> writes:
> 2024-04-06 13:54:53.868 CST [4840] LOG:  received fast shutdown request

Something is sending your postmaster a shutdown signal (SIGINT).
You need to figure out how that is happening.

In the Windows world I think the most likely theory is that some
script is mistakenly issuing "pg_ctl stop"; the signal mechanism
we use on that platform doesn't map onto anything else people would
commonly do.  But that's a guess.  There's no hard evidence about
the signal source here.

            regards, tom lane



Re: BUG #18428: Connection broken but DB service still alive.

От
盧致均(Harry)
Дата:
Hi Tom,

It there a log path can record the shutdown signal is from where?
Because our postgresql server just provide for one web application to use.
And our test environment never happen this issue with same web application & DB version.

Tom Lane <tgl@sss.pgh.pa.us> 於 2024年4月12日 週五 下午9:38寫道:
PG Bug reporting form <noreply@postgresql.org> writes:
> 2024-04-06 13:54:53.868 CST [4840] LOG:  received fast shutdown request

Something is sending your postmaster a shutdown signal (SIGINT).
You need to figure out how that is happening.

In the Windows world I think the most likely theory is that some
script is mistakenly issuing "pg_ctl stop"; the signal mechanism
we use on that platform doesn't map onto anything else people would
commonly do.  But that's a guess.  There's no hard evidence about
the signal source here.

                        regards, tom lane


--
Thank you & Best Regards

Harry Lu

______________________________________

Linktech Inc.

220 新北市板橋區三民路2段37號7樓之2
Phone:+886-2-2959-9166#160+886-2-7752-7658#160
E-mail: harry@linktech.com.tw
Web: www.linktech.com.tw