python - Intermittent Pooler Error in django app server - Stack Overflow

admin2025-04-17  4

facing intermittent Pooler Error: server conn crashed? in my http server. Tried searching and fixing long running transaction in my system but didn't help. Also this happens very randomly at any point in time without any co-relation with traffic. Sharing error logs:

2025-01-31 11:41:07.067 1 LOG C-0x55d7847ac110: logs/[email protected]:34186 closing because: client close request (age=0)
2025-01-31 11:41:07.051 1 LOG C-0x55d7847ac110: logs/[email protected]:34186 login attempt: db=test user=server_application_api tls=no
2025-01-31 11:41:06.988 1 LOG C-0x55d7847ac110: logs/[email protected]:34096 closing because: client close request (age=0)
2025-01-31 11:41:06.968 1 LOG C-0x55d7847ae820: logs/[email protected]:34048 closing because: client close request (age=0)
2025-01-31 11:41:06.952 1 LOG C-0x55d7847ac110: logs/[email protected]:34096 login attempt: db=test user=server_application_api tls=no
2025-01-31 11:41:06.948 1 WARNING C-0x55d7847ac110: logs/[email protected]:40674 Pooler Error: server conn crashed?

CloudWatch metrics

facing intermittent Pooler Error: server conn crashed? in my http server. Tried searching and fixing long running transaction in my system but didn't help. Also this happens very randomly at any point in time without any co-relation with traffic. Sharing error logs:

2025-01-31 11:41:07.067 1 LOG C-0x55d7847ac110: logs/[email protected]:34186 closing because: client close request (age=0)
2025-01-31 11:41:07.051 1 LOG C-0x55d7847ac110: logs/[email protected]:34186 login attempt: db=test user=server_application_api tls=no
2025-01-31 11:41:06.988 1 LOG C-0x55d7847ac110: logs/[email protected]:34096 closing because: client close request (age=0)
2025-01-31 11:41:06.968 1 LOG C-0x55d7847ae820: logs/[email protected]:34048 closing because: client close request (age=0)
2025-01-31 11:41:06.952 1 LOG C-0x55d7847ac110: logs/[email protected]:34096 login attempt: db=test user=server_application_api tls=no
2025-01-31 11:41:06.948 1 WARNING C-0x55d7847ac110: logs/[email protected]:40674 Pooler Error: server conn crashed?

CloudWatch metrics

Share asked Jan 31 at 12:26 DevDev 8281 gold badge11 silver badges22 bronze badges 1
  • 2 It's somewhere between pgbouncer and PostgreSQL itself. Check the PostgreSQL logs and any network logs you may have. – Richard Huxton Commented Jan 31 at 12:59
Add a comment  | 

1 Answer 1

Reset to default 0

This error is due to a problem in connection between your application and PostgreSQL and/or with pgbouncer.

As this is a generic error message which can be caused by a couple of factors, it is best to (as has been suggested in the comments) check the PostgreSQL and pgbouncer logs to see if there are details about this error.

You should also check if your network is in good condition as I have experienced this error before due to network issues. Also ensure that firewalls are not affecting connections to your database.

Also you might want to check your pgbouncer configuration to ensure they can handle client requests appropriately. For instance, you might want to set the total number of clients that can connect to some high value e.g: max_client_conn=5000 and ensure that default_pool_size and other configurations are correctly set according to your specific use case.

You can look at this issue and this.

转载请注明原文地址:http://anycun.com/QandA/1744862113a88667.html