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

Getting "server conn crashed?" after query runs for 1800s #966

Closed
udit47 opened this issue Oct 18, 2023 · 4 comments
Closed

Getting "server conn crashed?" after query runs for 1800s #966

udit47 opened this issue Oct 18, 2023 · 4 comments
Labels
pending-close will be closed if no further discussion

Comments

@udit47
Copy link

udit47 commented Oct 18, 2023

I am getting "server conn crashed" exactly once the query run time hits 1800s. Query is continuously running during this time and in active state (checked from pg_stat_activity). Query is related to archival and uses dblink to execute a function in another database on the same server. So, there are two queries in pg_stat_activity one which is caller function and another is the function that is being executed in remote database. However, with when direct connection to postgresql is made, query runs successfully.

Pgbouncer config:

listen_addr = ip
listen_port = 7432
auth_type = scram-sha-256
max_client_conn = 8000
default_pool_size = 300
ignore_startup_parameters = extra_float_digits

Pgbouncer Logs during this:

2023-10-18 21:14:49.387 IST [856] LOG C-0x564b64890540: dbname/uname@172.22.1.253:58718 closing because: server conn crashed? (age=1800s)
2023-10-18 21:14:49.387 IST [856] WARNING C-0x564b64890540: dbname/uname@172.22.1.253:58718 pooler error: server conn crashed?

I have not set any timeouts explicitly at PG or PgBouncer level.
Are there any default timeouts which could cause this?

@eulerto
Copy link
Member

eulerto commented Oct 18, 2023

No, there isn't. Check your firewall and the TCP keepalive settings.

@JelteF
Copy link
Member

JelteF commented Oct 23, 2023

1800 is the default Keepalive Interval on Linux, so it seems like a likely culprit.

@udit47
Copy link
Author

udit47 commented Oct 23, 2023

@eulerto , @JelteF Thanks for guidance. Will check after changing keep alive settings and update.

@eulerto eulerto added the pending-close will be closed if no further discussion label Nov 8, 2023
@eulerto
Copy link
Member

eulerto commented May 3, 2024

Having not received a reply, closed.

@eulerto eulerto closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-close will be closed if no further discussion
Projects
None yet
Development

No branches or pull requests

3 participants