Welcome! Log In Create A New Profile

Advanced

[PHP] How to preload opcache dirs ?

Posted by Gary M 
Gary M
[PHP] How to preload opcache dirs ?
February 02, 2018 06:50AM
Hi,

I'm trying to use my php app and php7 in AWS lambda. Lambda doesn't
natively support php, so I need to proxy through nodejs.

A problem with lambda is the more application files accessed from disk
increases request response time. Once a cold start is completed, php7 can
be very fast. eg. 0.066ms. Lambda periodically recycles instances, meaning
once php byte code is in opcache, the instance may be discarded forcing
cold start compiles on the next request. Memcached cannot be used in the
Lambda configuration

I'd like to find a way to precompile my php code and place the byte code
into opcache's directory.

I'm not sure how to make this work. Suggestions appreciated

b/r
g
Sorry, only registered users may post in this forum.

Click here to login