Bug #75488 [NEW]: Under heavy load PHP misses Opcache hits with no errors
| From: | david at davidfavor dot com | Date: | Mon, 06 Nov 2017 03:20:48 +0000 |
| Subject: | Bug #75488 [NEW]: Under heavy load PHP misses Opcache hits with no errors | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-212476@lists.php.net to get a copy of this message | ||
From: david at davidfavor dot com
Operating system: Ubuntu Zesty
PHP version: 7.1.11
Package: opcache
Bug Type: Bug
Bug description:Under heavy load PHP misses Opcache hits with no errors
Description:
------------
1) Create a simple hello.php (Hello World) file.
2) Run the following...
while : ; do curl -s -I -L https://foo.com/hello.php
>/dev/null ; done
3) Track FPM access log.
First all's well. 100% cache hits + FPM access log shows 0.00% CPU time
for script execution.
Then odd behavior begins.
First huge CPU time number begin, ranging from 1-10+ seconds.
Looking at Opcache stats, 99% hits for a few minutes.
Then cache hit rate begins to drop also.
I've setup opcache logging with log verbosity == 4 + nothing useful
comes out.
No Apache to FPM communication errors logged.
No FPM errors logged (running in at debug level).
No FPM slow log entries.
I've gone through Opcache config + see no setting which might explain
this.
I'm using the ondrej:php + ondrej:apache2 PPAs so,
Apache-2.4.29-0.1 + PHP-7.1.11-1 are my versions.
My... Command Line Kung Fu is strong... so if someone can suggest how to
debug this deeper, let me know.
Test script:
---------------
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Expected result:
----------------
Expected result 100% cache hits.
Actual result:
--------------
Roughly 1 out of 30ish requests fail to come from cache.
--
Edit bug report at https://bugs.php.net/bug.php?id=75488&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75488&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75488&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75488&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75488&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75488&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75488&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75488&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75488&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75488&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75488&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75488&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75488&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75488&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75488&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75488&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75488&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75488&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75488&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75488&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75488&r=mysqlcfg