Req #65078 [Com]: opcache not enabled in embedded sapi / uwsgi
| From: | matthijs at stdin dot nl | Date: | Sat, 12 Dec 2015 11:03:11 +0000 |
| Subject: | Req #65078 [Com]: opcache not enabled in embedded sapi / uwsgi | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197828@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65078&edit=1
ID: 65078
Comment by: matthijs at stdin dot nl
Reported by: info at icod dot de
Summary: opcache not enabled in embedded sapi / uwsgi
Status: Open
Type: Feature/Change Request
Package: opcache
Operating System: linux 3.9.6
PHP Version: 5.5.0
Block user comment: N
Private report: N
New Comment:
The project referenced two comments ago seems to be for enabling the opcache in the CGI and CLI
SAPIs, which use a single process invocation for each request, so they need different ways of
sharing and storing the cache.
However, UWSGI is a framework that uses persistent worker processes, using the embed SAPI. I
don't know details about the forking behaviour of UWSGI, and it if fulfills the constraints for
a shared OpCache, but even without sharing, caching opcodes within a single worker process would be
useful.
I guess that always enabling the OpCache for the embed SAPI won't work - it could also be used
in an one-off process, or without proper shard memory, etc. So I guess the proper fix for this is to
provide an API that an embedding program can use to set up and enable the OpCache?
Previous Comments:
------------------------------------------------------------------------
[2014-01-28 02:55:36] hittingsmoke at gmail dot com
Also getting this on PHP 5.5.8 with uwsgi 2.0.
Is this a PHP problem or a uwsgi problem?
------------------------------------------------------------------------
[2013-06-21 21:53:04] sixd@php.net
You might want to get involved in this project:
http://news.php.net/php.internals/67768
------------------------------------------------------------------------
[2013-06-21 00:17:02] info at icod dot de
Server API uWSGI/php
------------------------------------------------------------------------
[2013-06-21 00:15:24] info at icod dot de
Description:
------------
Startup Failed Opcode Caching is only supported in Apache, ISAPI, FPM and FastCGI SAPIs
uwsgi (my version 1.9.12)
http://projects.unbit.it/uwsgi/
uses the embed sapi to compile a php plugin
you can build plugins with different versions of php, good stuff.
you can use apc in php-5.4, one could use apc in php-5.5 but why?
the opcode cache is disabled because uwsgi is using the embedded sapi to build the plugin.
Test script:
---------------
<?php phpinfo(); ?>
Expected result:
----------------
Opcode Caching Enabled
Optimization Enabled
Actual result:
--------------
Opcode Caching Disabled
Optimization Disabled
Startup Failed Opcode Caching is only supported in Apache, ISAPI, FPM and FastCGI SAPIs
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65078&edit=1