Topic: PHP7 fpm - stalls on Centos 6

We are using the latest PHP7 rpm on Centos6 and Centos7 - 7.0.0-1.el6.remi
Centos7 box is OK, on Centos 6 (2.6.32-504.30.3.el6.x86_64) , php-fpm stalls randomly and the PHP request consumes between 500-900 msec of cpu time. Typically, it takes just about 50 msec of CPU time in average.

php-fpm with PHP 5.5 is OK.
php-fpm with PHP7 on Centos7 is OK

The only difference is opcache.huge_code_pages=0 on Centos6, I can't turn it on, because it segfaults.

Am I the only one who sees this problem?

Thank you, Vojtech

Re: PHP7 fpm - stalls on Centos 6

Does whis only appears with 7.0.0-1, or already occurs with the RC ?

> The only difference is opcache.huge_code_pages=0 on Centos6, I can't turn it on, because it segfaults.
Yes, this is a know bug, and the reason why it is disabled.

Can you try without opcache ?

I think we need the fix which are pending for opcache in 7.0.1

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP7 fpm - stalls on Centos 6

Please also try 7.0.0-2 (just uploaded) in which huge_code_page are totally disabled at build time (instead of using the ini option)

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP7 fpm - stalls on Centos 6

I just tried 7.0.0-2.el6.remi, but it's the same story.
Yes, I've tried it without opcache (that was the first thing I suspected), but it didn't help.

I still don't have a repeatable test case, the problem is just clearly visible in production (different pages, a lot of different users). When I test a single page using httperf, it happens less often. When I switch nginx to Centos7 php-fpm upstrem, the problem vanishes.

UPDATE: I'm testing another box with Centos6 (2.6.32-573.7.1.el6.x86_64) and 7.0.0-2, and it's running just fine. I have to find any possible config differences.
So far, Thank you Remi for your response and for all your work!

Re: PHP7 fpm - stalls on Centos 6

Solved!

The Centos6 host, where I observed stalls, had huge pages enabled. I just disabled hugepage usage and the problem is gone!

echo 'never' > /sys/kernel/mm/redhat_transparent_hugepage/enabled

It's quite interesting, because it doesn't matter if you have "opcache.huge_code_pages=1" or "opcache.huge_code_pages=0" in the opcache config.

Re: PHP7 fpm - stalls on Centos 6

There's no problem on Centos7 with the default setting:

~]$ uname -a
Linux xyz 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
~]$ cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
~]$ grep 'huge' /etc/opt/remi/php70/php.d/10-opcache.ini
opcache.huge_code_pages=1

Re: PHP7 fpm - stalls on Centos 6

Thanks for the feedback about redhat_transparent_hugepage

And yes, this is only EL-6

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP7 fpm - stalls on Centos 6

I just upload 7.0.1RC1 in remi-test (only as SCL)

It will be nice to have some feedback about this RC, especially on EL-6 and huge_page=1 (enabled at build time, but still disabled in configuration, for safety)

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP7 fpm - stalls on Centos 6

Base packages also upload in the new "remi-php70-test"

http://rpms.remirepo.net/enterprise/6/t … /repoview/
http://rpms.remirepo.net/enterprise/7/t … /repoview/

Repo definition is available in the new remi-release package.

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi