Author Topic: PHP-FPM Not Working (503 Service Unavailable)  (Read 21770 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Re: PHP-FPM Not Working (503 Service Unavailable)
« Reply #15 on: February 09, 2021, 11:26:50 AM »
You can enable php-fpm at domain level or webserver level. I will tell you about domain level

1)  Go to Webservers -> Domain conf
2) Select the username for domain where you want to activate php-fpm
3) If there is no domain configuration, click the option to create a new configuration
4) In the configuration, select apache->php-fpm. If you are using nginx select nginx -> apache-> php-fpm
5) Select the version of php-fpm that you want
6) Rebuild and save the configuration

You should not get 503 error now on this domain.

Offline
*
Re: PHP-FPM Not Working (503 Service Unavailable)
« Reply #16 on: February 24, 2021, 07:41:43 AM »
Go to cwp dashboard, then click Webserver Settings->WebServers Conf Editor, Select PHP-FPM menu then click on "/opt/alt/php-fpmxx/usr/etc/php-fpm.d/users/"

Now, click on "Add New Conf File" here you will create filename of your user name account, eg username.conf.

Then try using these code into the file:

[account_username]
listen = /opt/alt/php-fpm74/usr/var/sockets/account_username.sock
listen.allowed_clients = 127.0.0.1

;listen.owner = "account_username"
listen.group = "nobody"
listen.mode = 0660
user = "account_username"
group = "account_username"

;request_slowlog_timeout = 15s
;slowlog = /opt/alt/php-fpm74/usr/var/log/php-fpm-slowlog-account_username.log

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 15s

;listen.backlog = -1
;request_terminate_timeout = 0s
rlimit_files = 131072
rlimit_core = unlimited
catch_workers_output = yes

env[HOSTNAME] = $HOSTNAME
env[TMP] = /home/account_username/tmp
env[TMPDIR] = /home/account_username/tmp
env[TEMP] = /home/account_username/tmp
env[PATH] = /usr/local/bin:/usr/bin:/bin

Change red word and php-fpm version with yours, after finish restart phpfpm : service php-fpm74 restart

You safe my life, thank you so much.
Biswas Host Ltd

www.biswashost.com

Domain, Hosting, Cloud VPS, Dedicated Server,

Web Design, SSL, VPN, Professional Email & More

Offline
*
Re: PHP-FPM Not Working (503 Service Unavailable)
« Reply #17 on: July 15, 2021, 07:02:15 AM »
It worked beautifully! Thanks!
But the question remains: Where is the user's conf file after updating the webserver model????


Go to cwp dashboard, then click Webserver Settings->WebServers Conf Editor, Select PHP-FPM menu then click on "/opt/alt/php-fpmxx/usr/etc/php-fpm.d/users/"

Now, click on "Add New Conf File" here you will create filename of your user name account, eg username.conf.

Then try using these code into the file:

[account_username]
listen = /opt/alt/php-fpm74/usr/var/sockets/account_username.sock
listen.allowed_clients = 127.0.0.1

;listen.owner = "account_username"
listen.group = "nobody"
listen.mode = 0660
user = "account_username"
group = "account_username"

;request_slowlog_timeout = 15s
;slowlog = /opt/alt/php-fpm74/usr/var/log/php-fpm-slowlog-account_username.log

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 15s

;listen.backlog = -1
;request_terminate_timeout = 0s
rlimit_files = 131072
rlimit_core = unlimited
catch_workers_output = yes

env[HOSTNAME] = $HOSTNAME
env[TMP] = /home/account_username/tmp
env[TMPDIR] = /home/account_username/tmp
env[TEMP] = /home/account_username/tmp
env[PATH] = /usr/local/bin:/usr/bin:/bin

Change red word and php-fpm version with yours, after finish restart phpfpm : service php-fpm74 restart