Обсуждение: Re: Terminating connection because of crash of another server process
On Wed, 2023-09-27 at 16:25 +0300, Deo Felix wrote: > Please assist Im getting the error below in Postgresql 13 database > > WARNING: terminating connection because of crash of another server process The trick is not to have any crashes. Look at the PostgreSQL log to determine the cause of the crash and see that it does not happen again. A well configured PostgreSQL on good hardware should not crash. Yours, Laurenz Albe
I've had two rounds of that problem over the years. Both were caused by 3rd-party extensions to PostgreSQL.
The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory
Please advice what configuration should I do
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Wednesday, September 27, 2023 4:39:18 PM
To: Deo Felix <deofelix9@gmail.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Terminating connection because of crash of another server process
Sent: Wednesday, September 27, 2023 4:39:18 PM
To: Deo Felix <deofelix9@gmail.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Terminating connection because of crash of another server process
On Wed, 2023-09-27 at 16:25 +0300, Deo Felix wrote:
> Please assist Im getting the error below in Postgresql 13 database
>
> WARNING: terminating connection because of crash of another server process
The trick is not to have any crashes.
Look at the PostgreSQL log to determine the cause of the crash and
see that it does not happen again. A well configured PostgreSQL
on good hardware should not crash.
Yours,
Laurenz Albe
> Please assist Im getting the error below in Postgresql 13 database
>
> WARNING: terminating connection because of crash of another server process
The trick is not to have any crashes.
Look at the PostgreSQL log to determine the cause of the crash and
see that it does not happen again. A well configured PostgreSQL
on good hardware should not crash.
Yours,
Laurenz Albe
What extension please can you mention
From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: Wednesday, September 27, 2023 4:50:27 PM
To: Deo Felix <deofelix9@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Terminating connection because of crash of another server process
Sent: Wednesday, September 27, 2023 4:50:27 PM
To: Deo Felix <deofelix9@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Terminating connection because of crash of another server process
I've had two rounds of that problem over the years. Both were caused by 3rd-party extensions to PostgreSQL.
On Wed, 2023-09-27 at 13:57 +0000, Deo Felix wrote: > Please advice what configuration should I do Read the PostgreSQL log. Not only the one line you keep repeating. Yours, Laurenz Albe
> On Sep 27, 2023, at 7:58 AM, Deo Felix <deofelix9@gmail.com> wrote: > > What extension please can you mention Both were years ago and may well have been fixed by now. You need to audit what (whether) 3rd-party extensions you have,and how necessary they are. That said: POWA and TimescaleDB.
> On Sep 27, 2023, at 7:58 AM, Deo Felix <deofelix9@gmail.com> wrote: > > What extension please can you mention I did. But you need to see what extensions *you* have installed, if any.
There is a view that is causing to fail
failed process was running refresh materialized view
On Wed, 27 Sept 2023 at 17:05, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 2023-09-27 at 13:57 +0000, Deo Felix wrote:
> Please advice what configuration should I do
Read the PostgreSQL log. Not only the one line you keep repeating.
Yours,
Laurenz Albe
Okay thank you, I have not installed the mentioned extensions
On Wed, 27 Sept 2023 at 17:19, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
> On Sep 27, 2023, at 7:58 AM, Deo Felix <deofelix9@gmail.com> wrote:
>
> What extension please can you mention
Both were years ago and may well have been fixed by now. You need to audit what (whether) 3rd-party extensions you have, and how necessary they are.
That said: POWA and TimescaleDB.
> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote: > > Okay thank you, I have not installed the mentioned extensions That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to auditfor *any* 3rd-party extensions in *YOUR* installation.
Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have adviced
pgaudit, repmgr, pgagent And I will audit them as you have adviced
On Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak
Deepak
"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"
+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
"Plant a Tree, Go Green"
Make In India : http://www.makeinindia.com/home
On Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:
Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
The problem occurred when refreshing materialized views, out of shared memory error occur
On Thu, 28 Sept 2023 at 08:51, Deepak Goel <deicool@gmail.com> wrote:
The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
Please print the "out of shared memory error" or you need to make a provision for printing detailed error.
Deepak
Deepak
"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"
+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
"Plant a Tree, Go Green"
Make In India : http://www.makeinindia.com/home
On Thu, Sep 28, 2023 at 4:55 PM Deo Felix <deofelix9@gmail.com> wrote:
The problem occurred when refreshing materialized views, out of shared memory error occurOn Thu, 28 Sept 2023 at 08:51, Deepak Goel <deicool@gmail.com> wrote:The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
Please find the screenshot of error from the log file
On Thu, 28 Sept 2023 at 14:29, Deepak Goel <deicool@gmail.com> wrote:
Please print the "out of shared memory error" or you need to make a provision for printing detailed error.
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 4:55 PM Deo Felix <deofelix9@gmail.com> wrote:The problem occurred when refreshing materialized views, out of shared memory error occurOn Thu, 28 Sept 2023 at 08:51, Deepak Goel <deicool@gmail.com> wrote:The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
Вложения
The error says very little. You might want to put the 'Debug' on along with "Detail".
Deepak
Deepak
"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"
+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool
"Plant a Tree, Go Green"
Make In India : http://www.makeinindia.com/home
On Fri, Sep 29, 2023 at 1:54 PM Deo Felix <deofelix9@gmail.com> wrote:
Please find the screenshot of error from the log fileOn Thu, 28 Sept 2023 at 14:29, Deepak Goel <deicool@gmail.com> wrote:Please print the "out of shared memory error" or you need to make a provision for printing detailed error.
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 4:55 PM Deo Felix <deofelix9@gmail.com> wrote:The problem occurred when refreshing materialized views, out of shared memory error occurOn Thu, 28 Sept 2023 at 08:51, Deepak Goel <deicool@gmail.com> wrote:The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
Вложения
On Fri, 2023-09-29 at 11:21 +0300, Deo Felix wrote: > Please find the screenshot of error from the log file postgresqlerror.png It is really amazing how much effort you make *not* to share any relevant information with us. But there is finally some interesting message hidden in your image: server process (PID 14257) was terminated by signal 9: Killed Since I don't expect that random users on your server machine go around "kill -9"-ing PostgreSQL processes, it is very likely that PostgreSQL is crashed by the Linux out-of-memory killer. You should disable memory overcommit, see https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT Then you will start getting "out of memory" errors instead of crashes. To combat these, reduce the memory usage parameters, mostly "work_mem", or reduce the number of active database sessions by using a connection pool. Yours, Laurenz Albe
It is in production that is why the debug is off
On Fri, 29 Sept 2023 at 11:41, Deepak Goel <deicool@gmail.com> wrote:
The error says very little. You might want to put the 'Debug' on along with "Detail".
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Fri, Sep 29, 2023 at 1:54 PM Deo Felix <deofelix9@gmail.com> wrote:Please find the screenshot of error from the log fileOn Thu, 28 Sept 2023 at 14:29, Deepak Goel <deicool@gmail.com> wrote:Please print the "out of shared memory error" or you need to make a provision for printing detailed error.
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 4:55 PM Deo Felix <deofelix9@gmail.com> wrote:The problem occurred when refreshing materialized views, out of shared memory error occurOn Thu, 28 Sept 2023 at 08:51, Deepak Goel <deicool@gmail.com> wrote:The error posted by you ( WARNING: terminating connection because of crash of another server process) is at a very high level. Can you drill down for a detailed error?
Deepak"The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi"+91 73500 12833
deicool@gmail.com
Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool"Plant a Tree, Go Green"Make In India : http://www.makeinindia.com/homeOn Thu, Sep 28, 2023 at 8:13 AM Deo Felix <deofelix9@gmail.com> wrote:Okay, basically I have installed this extension
pgaudit, repmgr, pgagent And I will audit them as you have advicedOn Wed, 27 Sept 2023 at 22:13, Scott Ribe <scott_ribe@elevated-dev.com> wrote:> On Sep 27, 2023, at 1:07 PM, Deo Felix <deofelix9@gmail.com> wrote:
>
> Okay thank you, I have not installed the mentioned extensions
That's not the point. The point is that buggy extensions are one cause of this kind of instability, and you need to audit for *any* 3rd-party extensions in *YOUR* installation.
Вложения
Please note that the server is in production and debug is not enabled, that is why there is not much information in the log file.
I'm starting working with your suggestion including reducing the work_mem
On Fri, 29 Sept 2023 at 12:27, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2023-09-29 at 11:21 +0300, Deo Felix wrote:
> Please find the screenshot of error from the log file postgresqlerror.png
It is really amazing how much effort you make *not* to share
any relevant information with us. But there is finally some
interesting message hidden in your image:
server process (PID 14257) was terminated by signal 9: Killed
Since I don't expect that random users on your server machine
go around "kill -9"-ing PostgreSQL processes, it is very likely
that PostgreSQL is crashed by the Linux out-of-memory killer.
You should disable memory overcommit, see
https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
Then you will start getting "out of memory" errors instead of
crashes. To combat these, reduce the memory usage parameters,
mostly "work_mem", or reduce the number of active database sessions
by using a connection pool.
Yours,
Laurenz Albe
On Mon, Oct 2, 2023 at 11:34 AM Deo Felix <deofelix9@gmail.com> wrote:
Please note that the server is in production and debug is not enabled, that is why there is not much information in the log file.
We need the expanded error. Please enable (debug, detail) in production. You can turn it off once the detailed error is found out.
I'm starting working with your suggestion including reducing the work_memOn Fri, 29 Sept 2023 at 12:27, Laurenz Albe <laurenz.albe@cybertec.at> wrote:On Fri, 2023-09-29 at 11:21 +0300, Deo Felix wrote:
> Please find the screenshot of error from the log file postgresqlerror.png
It is really amazing how much effort you make *not* to share
any relevant information with us. But there is finally some
interesting message hidden in your image:
server process (PID 14257) was terminated by signal 9: Killed
Since I don't expect that random users on your server machine
go around "kill -9"-ing PostgreSQL processes, it is very likely
that PostgreSQL is crashed by the Linux out-of-memory killer.
You should disable memory overcommit, see
https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
Then you will start getting "out of memory" errors instead of
crashes. To combat these, reduce the memory usage parameters,
mostly "work_mem", or reduce the number of active database sessions
by using a connection pool.
Yours,
Laurenz Albe