How to reboot with admin level Services / php-fpm73 api?

Kadir Ülger

Verified User
Joined
Dec 27, 2020
Messages
13
Location
Istanbul
Hello to everyone. As I mentioned in the title, I need the api to restart the php-fpm73 service.

I want this for this reason; When there is heavy visitor traffic, php-fpm73 crashes and does not run any php files. However, when I enter the DA panel at the administrator level and restart this service from the Services, it is fixed. It's always hard to check this and log into the panel and reboot.

If I can do this with the api I can press a button and restart when there is a problem. I can even check with the scheduled task and auto-restart when there is a problem.

I had done user-level Api operations before, but I couldn't find what I wanted in the admin-level api document.
 
I don't know api, but if you're using a scheduled task, you could also use the system command to restart it.
service php-fpm73 restart

However, why does it crashes on heavy visitor traffic? Do the php-fpm73 logs show anything?
Just curiousity as we kind of had the same issue and even without heavy traffic.
 
There is an API for that, using /CMD_SERVICE

and you can send this data to restart php-fpm73

Code:
service=php-fpm73&action=restart

By the way the above actually can be found when you do debug mode in directadmin. This is the powerful thing about directadmin, whatever you do in GUI it actually has API, you just need to enable the debug mode to get this value.
 
Last edited:
Back
Top