Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/postgresql] postgres pod is frequently getting shutdown. #25846

Open
swyrik opened this issue May 14, 2024 · 2 comments
Open

[bitnami/postgresql] postgres pod is frequently getting shutdown. #25846

swyrik opened this issue May 14, 2024 · 2 comments
Assignees
Labels
postgresql stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@swyrik
Copy link

swyrik commented May 14, 2024

Name and Version

bitnami/postgresql 15.6.0-debian-12-r7

What architecture are you using?

None

What steps will reproduce the bug?

Installed using helm charts on RHEL linux machine.

Are you using any custom parameters or values?

I don't have any custom values.

What is the expected behavior?

No response

What do you see instead?

postgresql 05:45:24.66 INFO  ==>
postgresql 05:45:24.67 INFO  ==> Welcome to the Bitnami postgresql container
postgresql 05:45:24.68 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
postgresql 05:45:24.68 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
postgresql 05:45:24.68 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
postgresql 05:45:24.69 INFO  ==>
postgresql 05:45:25.12 INFO  ==> ** Starting PostgreSQL setup **
postgresql 05:45:25.28 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 05:45:25.29 INFO  ==> Cleaning stale /bitnami/postgresql/data/postmaster.pid file
postgresql 05:45:25.38 INFO  ==> Loading custom pre-init scripts...
postgresql 05:45:25.48 INFO  ==> Initializing PostgreSQL database...
postgresql 05:45:25.49 INFO  ==> Custom configuration /opt/bitnami/postgresql/conf/pg_hba.conf detected
postgresql 05:45:25.83 INFO  ==> Deploying PostgreSQL with persisted data...
postgresql 05:45:25.97 INFO  ==> Configuring replication parameters
postgresql 05:45:26.19 INFO  ==> Configuring fsync
postgresql 05:45:26.68 INFO  ==> Loading custom scripts...
postgresql 05:45:26.69 INFO  ==> Enabling remote connections

postgresql 05:45:26.88 INFO  ==> ** PostgreSQL setup finished! **
postgresql 05:45:27.08 INFO  ==> ** Starting PostgreSQL **
2024-05-14 05:45:27.503 GMT [1] LOG:  pgaudit extension initialized
2024-05-14 05:45:27.582 GMT [1] LOG:  starting PostgreSQL 15.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-05-14 05:45:27.583 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-05-14 05:45:27.583 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2024-05-14 05:45:27.592 GMT [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-05-14 05:45:27.605 GMT [1] LOG:  hostssl record cannot match because SSL is disabled
2024-05-14 05:45:27.605 GMT [1] HINT:  Set ssl = on in postgresql.conf.
2024-05-14 05:45:27.605 GMT [1] CONTEXT:  line 15 of configuration file "/opt/bitnami/postgresql/conf/pg_hba.conf"
2024-05-14 05:45:27.680 GMT [93] LOG:  database system was interrupted; last known up at 2024-05-14 05:41:28 GMT
2024-05-14 05:45:28.192 GMT [93] LOG:  database system was not properly shut down; automatic recovery in progress
2024-05-14 05:45:28.280 GMT [93] LOG:  redo starts at 0/436CF98
2024-05-14 05:45:28.280 GMT [93] LOG:  invalid record length at 0/436E4A8: wanted 24, got 0
2024-05-14 05:45:28.280 GMT [93] LOG:  redo done at 0/436E470 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2024-05-14 05:45:28.285 GMT [91] LOG:  checkpoint starting: end-of-recovery immediate wait
2024-05-14 05:45:28.297 GMT [91] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.003 s, total=0.014 s; sync files=3, longest=0.002 s, average=0.001 s; distance=5 kB, estimate=5 kB
2024-05-14 05:45:28.379 GMT [1] LOG:  database system is ready to accept connections
2024-05-14 05:50:28.397 GMT [91] LOG:  checkpoint starting: time
2024-05-14 05:50:28.583 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.101 s, sync=0.002 s, total=0.187 s; sync files=2, longest=0.002 s, average=0.001 s; distance=5 kB, estimate=5 kB
2024-05-14 05:55:28.683 GMT [91] LOG:  checkpoint starting: time
2024-05-14 05:55:28.790 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.101 s, sync=0.002 s, total=0.108 s; sync files=2, longest=0.002 s, average=0.001 s; distance=6 kB, estimate=6 kB
2024-05-14 06:00:28.887 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:00:29.081 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.189 s, sync=0.002 s, total=0.195 s; sync files=2, longest=0.002 s, average=0.001 s; distance=6 kB, estimate=6 kB
2024-05-14 06:05:28.183 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:05:28.291 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.102 s, sync=0.002 s, total=0.109 s; sync files=2, longest=0.002 s, average=0.001 s; distance=7 kB, estimate=7 kB
2024-05-14 06:10:28.373 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:10:28.489 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.102 s, sync=0.004 s, total=0.116 s; sync files=2, longest=0.004 s, average=0.002 s; distance=8 kB, estimate=8 kB
2024-05-14 06:15:28.589 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:15:28.782 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.187 s, sync=0.002 s, total=0.194 s; sync files=2, longest=0.002 s, average=0.001 s; distance=1 kB, estimate=7 kB
2024-05-14 06:20:28.882 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:20:29.082 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.184 s, sync=0.002 s, total=0.200 s; sync files=2, longest=0.002 s, average=0.001 s; distance=2 kB, estimate=6 kB
2024-05-14 06:25:28.181 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:25:28.288 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.101 s, sync=0.002 s, total=0.107 s; sync files=2, longest=0.002 s, average=0.001 s; distance=2 kB, estimate=6 kB
2024-05-14 06:30:28.378 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:30:28.879 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.103 s, sync=0.101 s, total=0.501 s; sync files=2, longest=0.101 s, average=0.051 s; distance=3 kB, estimate=6 kB
2024-05-14 06:35:28.966 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:35:29.088 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.101 s, sync=0.007 s, total=0.123 s; sync files=2, longest=0.007 s, average=0.004 s; distance=3 kB, estimate=5 kB
2024-05-14 06:40:28.188 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:40:28.791 GMT [91] LOG:  checkpoint complete: wrote 6 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.503 s, sync=0.008 s, total=0.603 s; sync files=6, longest=0.006 s, average=0.002 s; distance=5 kB, estimate=5 kB
2024-05-14 06:45:28.867 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:45:28.982 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.108 s, sync=0.002 s, total=0.116 s; sync files=2, longest=0.002 s, average=0.001 s; distance=4 kB, estimate=5 kB
2024-05-14 06:50:29.078 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:50:29.186 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.102 s, sync=0.002 s, total=0.108 s; sync files=2, longest=0.002 s, average=0.001 s; distance=5 kB, estimate=5 kB
2024-05-14 06:55:29.268 GMT [91] LOG:  checkpoint starting: time
2024-05-14 06:55:29.382 GMT [91] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.102 s, sync=0.002 s, total=0.115 s; sync files=2, longest=0.002 s, average=0.001 s; distance=5 kB, estimate=5 kB
2024-05-14 06:58:21.424 GMT [1] LOG:  received smart shutdown request
2024-05-14 06:58:21.484 GMT [7151] FATAL:  the database system is shutting down
2024-05-14 06:58:24.691 GMT [7158] FATAL:  the database system is shutting down
2024-05-14 06:58:28.986 GMT [7166] FATAL:  the database system is shutting down
2024-05-14 06:58:38.583 GMT [7174] FATAL:  the database system is shutting down
2024-05-14 06:58:48.091 GMT [7182] FATAL:  the database system is shutting down
2024-05-14 06:58:51.454 GMT [6865] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [5327] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [5875] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [6142] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [5979] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [5839] FATAL:  terminating connection due to unexpected postmaster exit
2024-05-14 06:58:51.454 GMT [6499] FATAL:  terminating connection due to unexpected postmaster exit

Additional information

I see the above logs prior shutting down.
Our host machine is on RHEL.

Is there any way to know who has sent the shutdown signal? please help us.

@swyrik swyrik added the tech-issues The user has a technical issue about an application label May 14, 2024
@github-actions github-actions bot added the triage Triage is needed label May 14, 2024
@javsalgar
Copy link
Contributor

Hi,

Could you check if the liveness probe is failing? With kubectl describe pod you can see more details of the cause of the restart.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgresql stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants