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

Auto restart MySQL service if it went down #182

Open
bari86 opened this issue Jan 26, 2023 · 2 comments
Open

Auto restart MySQL service if it went down #182

bari86 opened this issue Jan 26, 2023 · 2 comments

Comments

@bari86
Copy link

bari86 commented Jan 26, 2023

Sometimes I see that MySQL service went down and then stays down. Would be good if there is something to monitor the service and restart it should it went down for 1 minute? I believe cPanel use something like this where if ever MySQL service is down, it can auto-restart it automatically.

@jessuppi
Copy link
Member

Thanks for posting @bari86

Interestingly right after you mentioned this, I had a client contact me who is using SlickStack on an older Ubuntu 20.04 server saying his website was crashed... the error log was full of Redis object cache related errors.

I have to assume whatever he experienced is likely the same as you.

I'm going to open a new Issue to investigate that further, but the "quick fix" is probably migrating your site to a brand new build on Ubuntu 22.04 which is incredibly stable for us.

About auto-restarting MySQL it's a great idea and something we used to have (kinda) with Monit, but after we stopped bundling monitoring apps there hasn't been any further attempt at auto-restarting services.

@hj-collab
Copy link

@jessuppi You can add the below line to make redis / mysql restart always when it runs out of memory. Ofcourse this won't restart for configuration errors. Override the systemd service file by creating an override file else update will override your change.

[Service]
Restart=always

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

No branches or pull requests

3 participants