ERROR: could not attach to dynamic shared area

From: Andrew Longwill <andrew(at)busuu(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: ERROR: could not attach to dynamic shared area
Date: 2024-06-26 14:43:30
Message-ID: PH0PR13MB49377CC9CCA28EA59EEB27C5DAD62@PH0PR13MB4937.namprd13.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

We’re using Postgresql 15.4 in AWS RDS. Since yesterday we have seen two occurrences where our PHP application becomes unable to connect to our RDS replicas. In the application logs we see the error "FATAL: could not attach to dynamic shared area". The RDS replica remains unusable in this state unless it’s rebooted.

In the Postgresql replica logs we see the following errors just before the above error occurs: (I’ve made the SELECT more succinct)

2024-06-25 21:04:36 UTC::@:[28757]:FATAL: terminating background worker "parallel worker" due to administrator command
2024-06-25 21:04:36 UTC::@:[28757]:STATEMENT: SELECT col1,..,col24 FROM my_table WHERE … DESC LIMIT 1
2024-06-25 21:04:36 UTC::@:[28758]:FATAL: terminating background worker "parallel worker" due to administrator command
2024-06-25 21:04:36 UTC::@:[28758]:STATEMENT: SELECT col1,..,col24 FROM my_table WHERE … DESC LIMIT 1
2024-06-25 21:04:36 UTC::@:[389]:LOG: background worker "parallel worker" (PID 28757) exited with exit code 1
2024-06-25 21:04:36 UTC::@:[389]:LOG: background worker "parallel worker" (PID 28758) exited with exit code 1

The same query is mentioned each time, however this is a query we’ve been running in production for many years. The query plan for that query is good.

AWS have advised that we try setting max_parallel_workers=0 and max_parallel_workers_per_gather=0.

Can anyone advise on why we might be seeing this error suddenly?

Many thanks

Andrew

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-06-26 15:05:26 Re: Autovacuum, dead tuples and bloat
Previous Message Ron Johnson 2024-06-26 13:15:30 Re: Autovacuum, dead tuples and bloat