Author Topic: PHP FPM  (Read 3359 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP FPM
« on: April 01, 2019, 11:14:03 AM »
Hello everyone,

i'm new to cwp and evaluating it for our use. Currently we are using ispconfig3.

I made a test setup on our environment with a new instance. Fresh installed centos 7 / and worked through the easy setup routine.
PHP-CGI is working fine, but when i try to force apache to php-fpm i get a 503 error.

When i look on the php-fpm running process it tells me the following:

--------------------------------------------------
Redirecting to /bin/systemctl status php-fpm70.service
● php-fpm70.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm70.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-04-01 12:53:22 CEST; 13min ago
  Process: 31137 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 27967 (php-fpm)
   CGroup: /system.slice/php-fpm70.service
           └─27967 php-fpm: master process (/opt/alt/php-fpm70/usr/etc/php-fpm.conf)                                     

Apr 01 12:53:22 cpw.huf.intranet systemd[1]: Started The PHP FastCGI Process Manager.
Apr 01 12:58:31 cpw.huf.intranet systemd[1]: Reloading The PHP FastCGI Process Manager.
Apr 01 12:58:31 cpw.huf.intranet systemd[1]: PID file /opt/alt/php-fpm70/usr/var/run/php-fpm.pid not readable (yet?) after reload.
Apr 01 12:58:31 cpw.huf.intranet systemd[1]: Reloaded The PHP FastCGI Process Manager.
----------------------------------------------------

Did i miss something?
Help appreciated :)

Best regards,
Ralph

Offline
*
Re: PHP FPM
« Reply #1 on: April 02, 2019, 08:56:43 AM »
try editing domain to use php-fpm from Webservers Domain Conf in the admin menu.
you can then check /var/log/cwp/webservers.log to check if you have some issue with the activation of fpm for that user.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: PHP FPM
« Reply #2 on: April 02, 2019, 07:20:05 PM »
Thank you a lot for helping me out with this :) i tried searching throught the php logs...

in the logfile which you mentioned i found the following

-----------------------------
2019-04-02 09:04:39 comp.domain Running Nginx/Varnish/Apache/PHP-FPM
2019-04-02 09:04:39 comp.domain Delete all configuration for domain
2019-04-02 09:04:39 comp.domain Nginx: SUCCESS conf enabled
2019-04-02 09:04:39 comp.domain Varnish: SUCCESS conf enabled template: default
2019-04-02 09:04:39 comp.domain Apache: SUCCESS conf enabled
2019-04-02 09:04:39 huf PHP-FPM php-fpm56: ERROR failed at quota or security limits
2019-04-02 09:04:39 huf PHP-FPM php-fpm70: ERROR failed at quota or security limits
2019-04-02 09:04:39 PHP-FPM php-fpm56: reload
2019-04-02 09:04:39 PHP-FPM php-fpm70: reload
-----------------------------

it seems, that there is a sequrity limit? or am i wrong?

so my next and hopefully last question for this topic: do you know where i can fix this over the admin panel? or better to say: where should i look.

best,
Ralph

Offline
*
Re: PHP FPM
« Reply #3 on: April 02, 2019, 09:54:37 PM »
try this test, replace USERNAME with your user
# su USERNAME -c "touch /home/USERNAME/.quota-check" -s /bin/bash
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: PHP FPM
« Reply #4 on: April 03, 2019, 10:22:41 AM »
Hi Studio4Host :)

thank you a lot for the fast supply with information and help.

i found the solution after googlin' a lot about centos in container (host is proxmox)

i had to edit the follwing file:
"/etc/pam.d/su"

to change all "session" variables to "OPTIONAL"

so that the file looks like this:
session         optional        system-auth
session         optional        postlogin
session         optional        pam_xauth.so

after this change php-fpm is running.

It seems to be a LXC Container reason with centos

Thank you alot for your help.
Can i come up to you about a subscription or a professional CWP setup on our server? (it looks like the software we want to use in the future :)

Best regards,
Ralph