-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Leader switch occurs every week in Patroni cluster #882
Comments
This issue does not appear to be related to Autobase or Patroni itself but rather to internal infrastructure problems. We recommend considering one of our support packages, where we can assist you in diagnosing and resolving this issue. Additionally, depending on the chosen package, we can conduct a comprehensive analysis of your database infrastructure and provide recommendations for improvement. You can find more details here: https://autobase.tech/docs/support |
|
Bug description
I am running a Patroni cluster with 3 nodes, and the leader switches automatically once a week. The issue happens without any explicit manual intervention. Below are the logs and observations from the most recent incident:
Node 1: 172.16.9.30 (previous leader before failover)
Node 2: 172.16.9.31
Node 3: 172.16.9.32 (new leader after failover)
172.16.9.32.log
172.16.9.30.log
Expected behavior
On 2025-01-30 at around 06:10, the following events occurred:
The Patroni service on 172.16.9.30 (db-1) was stopped, triggering a leader switch.
The system logs show that patroni.service was stopped and restarted:
The new leader was elected on 172.16.9.32 (db-3) after this event.
The PostgreSQL logs also indicated a request for a fast shutdown:
2025-01-30 06:10:49 +05 [1746391-15] LOG: received fast shutdown request
What I have checked so far:
Cron jobs: No evidence of scheduled tasks stopping Patroni or PostgreSQL.
Network: No major network outages or latency issues detected.
The leader switches every week, seemingly without a critical failure.
Steps to reproduce
The issue occurs on a weekly basis, but I have not found a clear trigger.
Installation method
Console (UI)
System info
OS ubuntu 24.04
Postgres version 17.2
Additional info
I would appreciate any guidance on:
Identifying the cause of these weekly leader switches.
Adjustments to configuration settings to prevent this from happening.
The text was updated successfully, but these errors were encountered: