You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Rose, John B" <jb...@utk.edu> on 2015/02/09 21:03:23 UTC

[users@httpd] Apache and PHP-FPM error

After implementing Apache 2.4 and PHP-FPM with the default settings we found that our system cpu usage went up significantly over what mod_php used for the same amount of web test traffic from "ab"

So we read a bit about tuning PHP-FPM and from this page ...

https://wiki.apache.org/httpd/PHP-FPM

We decided to put this ...


ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php-fpm/php-fpm.sock|fcgi://127.0.0.1:9000/usr/local/apache/utk/docs/


into the httpd.conf file. In order to use the unix domain socket (UDS) approach as a possible solution to reducing the big spike in cpu usage.


However we get this error when do a configtest on Apache ...


AH00526: Syntax error on line 431 of /etc/httpd/conf/httpd.conf:
ProxyPass URL must be absolute!

Any suggestions on the above error?

Any tips on tuning Apache/PHP-FPM ?

Thanks



Re: [users@httpd] Apache and PHP-FPM error

Posted by "Rose, John B" <jb...@utk.edu>.
We will check it. 

We use collectd to view full cpu usage. The user cpu usage is much lower
than prefork but the system cpu usage has increased significantly with
PHP-FPM. Pushing the total cpu load to ~90% frequently.

We have gone with the default settings for PHP-FPM.

This particular box has 16 cores and 48 GB RAM.

We are also using Event MPM.

We are not as familiar with how the threaded MPMs work as with prefork. So
we have just left the MaxRequestWorkers 400, etc. for the time being.


On 2/13/15 3:55 PM, "Tom Evans" <te...@googlemail.com> wrote:

>On Mon, Feb 9, 2015 at 8:20 PM, Rose, John B <jb...@utk.edu> wrote:
>> Bummer
>>
>> Since we want to stick with what is available via "yum" for Red Hat 7
>>
>> Thanks for the info
>>
>
>I doubt the lack of UDS, and having to use FCGI over TCP/IP is what is
>causing your load spikes compared to running with mod_php.
>
>More likely you need to tune the PHP-FPM side to start (+limit) the
>appropriate number of processes appropriate for your workload and
>available resources. A common cause of poor req/s is trying to service
>too many requests simultaneously, ie starting 100 FCGI workers on a 2
>CPU server.
>
>Cheers
>
>Tom
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and PHP-FPM error

Posted by Tom Evans <te...@googlemail.com>.
On Mon, Feb 9, 2015 at 8:20 PM, Rose, John B <jb...@utk.edu> wrote:
> Bummer
>
> Since we want to stick with what is available via "yum" for Red Hat 7
>
> Thanks for the info
>

I doubt the lack of UDS, and having to use FCGI over TCP/IP is what is
causing your load spikes compared to running with mod_php.

More likely you need to tune the PHP-FPM side to start (+limit) the
appropriate number of processes appropriate for your workload and
available resources. A common cause of poor req/s is trying to service
too many requests simultaneously, ie starting 100 FCGI workers on a 2
CPU server.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and PHP-FPM error

Posted by "Rose, John B" <jb...@utk.edu>.
Bummer 

Since we want to stick with what is available via "yum" for Red Hat 7

Thanks for the info

On 2/9/15 3:14 PM, "Eric Covener" <co...@gmail.com> wrote:

>On Mon, Feb 9, 2015 at 3:12 PM, Rose, John B <jb...@utk.edu> wrote:
>> 2.4.6
>
>2.4.7 is where support was added apparently.
>
>*) mod_proxy: Added support for unix domain sockets as the
>     backend server endpoint [Jim Jagielski, Blaise Tarr
>     <blaise tarr gmail com>]
>
>
>
>
>-- 
>Eric Covener
>covener@gmail.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and PHP-FPM error

Posted by Eric Covener <co...@gmail.com>.
On Mon, Feb 9, 2015 at 3:12 PM, Rose, John B <jb...@utk.edu> wrote:
> 2.4.6

2.4.7 is where support was added apparently.

*) mod_proxy: Added support for unix domain sockets as the
     backend server endpoint [Jim Jagielski, Blaise Tarr
     <blaise tarr gmail com>]




-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and PHP-FPM error

Posted by "Rose, John B" <jb...@utk.edu>.
2.4.6

On 2/9/15 3:10 PM, "Eric Covener" <co...@gmail.com> wrote:

>On Mon, Feb 9, 2015 at 3:03 PM, Rose, John B <jb...@utk.edu> wrote:
>> AH00526: Syntax error on line 431 of /etc/httpd/conf/httpd.conf:
>
>
>What release of 2.4? The UDS stuff wasn't there from the beginning.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache and PHP-FPM error

Posted by Eric Covener <co...@gmail.com>.
On Mon, Feb 9, 2015 at 3:03 PM, Rose, John B <jb...@utk.edu> wrote:
> AH00526: Syntax error on line 431 of /etc/httpd/conf/httpd.conf:


What release of 2.4? The UDS stuff wasn't there from the beginning.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org