Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
CloudLinux
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Service monitoring and restart

LeviLevi Member

Got interesting problem about few cases where PHP-FPM and/or MySQL hanged out. Service status OK, just received "gateway timeout" and that's it. Services "hanged out".

How to monitor for such behavior? Maybe with monit I could do something? Problem roots are users with shitty scripts. And I would like to restart services if there such "hang outs".

Comments

  • xHostsxHosts Member, Patron Provider

    Maybe use a bash script to check a website that is hosted on the server and if timeout is larger then x restart these services and have it check every 60 seconds or something

  • You don't need restarting script, you need to figure out why it is happening and fix that issue. PHP-FPM or MySQL is not kind of software that will just "hang out", constantly.

  • @JabJab said:
    You don't need restarting script, you need to figure out why it is happening and fix that issue. PHP-FPM or MySQL is not kind of software that will just "hang out", constantly.

    Problem is well known: shared hosting users. Since I provide free hosting, I would like to automate few things as much as it is possible.

  • risharderisharde Host Rep, Veteran

    @LeroyJ you can probably write a shell script to check the status of php-fpm and mysql from a command like service php-fpm status . If 'dead' restart. I didn't google for you but there must be someone out there that has done this before either on stackoverflow or github

  • risharderisharde Host Rep, Veteran

    I should mention that it does sound strange for php-fpm to entirely die without doing something really weird and mysql as well but I understand your use case is largely different from my experience

  • This might be a very basic question. But does the server have enough RAM to work with? Is it hanging because it's just slow? Then times out or something?

Sign In or Register to comment.