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

proxysql - systemd - random failure to start after system crash #3728

Closed
kashak88 opened this issue Dec 14, 2021 · 1 comment
Closed

proxysql - systemd - random failure to start after system crash #3728

kashak88 opened this issue Dec 14, 2021 · 1 comment

Comments

@kashak88
Copy link

proxysql 2.3.2
ubuntu 20.04

How to replicate:

  1. Make sure proxysql is running and pid file exists (ex. /var/lib/proxysql/proxysql.pid and it has a process id inside, let's say 1010)
  2. Imitate a "crash" by resetting a vm instead of doing a graceful shutdown (ex. in ESXI, right click - power - reset)
  3. System restarts and systemd tries to start proxysql

What happens (as expected):
proxysql[753]: Process 1010 died: No such process; trying to remove PID file. (/var/lib/proxysql/proxysql.pid)
proxysql starts successfully

What can also happen at random:
proxysql[742]: Daemon already running on PID file 1010
systemd[1]: proxysql.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: proxysql.service: Failed with result 'exit-code'.
systemd[1]: Failed to start High Performance Advanced Proxy for MySQL.

TLDR; some other service starts as PID 1010 after crash and systemd fails to start proxysql due to lingering pid file.
This can likely be fixed with Restart=on-failure set as default? Or maybe allow us to specify pid file location in proxysql.conf so it could be kept in a volatile location like /var/run/proxysql or something?

Regards

@renecannao
Copy link
Contributor

Hi @kashak88 .
PR #3707 from @smeinecke probably solves your issue.
The feature will be available in the next release.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants