Question

App Plataform enable OPcache and JIT - PHP 8

Posted November 16, 2021 112 views
PHPPHP FrameworksDeploymentLaravelDigitalOcean App Platform

Hello Everybody,

Trying to improve the performance of my application (made in Laravel 8 and PHP 8), already tried to enable OPcache and JIT but had no success. I created a .user.ini file in the public directory with the following code:

opcache.preload_user=www-data
opcache.memory_consumption=1024
opcache.interned_strings_buffer=256
opcache.max_accelerated_files=30000
opcache.validate_timestamps=0

opcache.enable=1
opcache.enable_cli=1
opcache.file_cache="/tmp/php-file-cache"
opcache.file_cache_only=1
opcache.file_cache_consistency_checks=1

Do I need to add something else or do you have any advice to improve performance?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

This warning shows on almost every request.

Does anyone have an idea of what can be the problem?

[app] [2021-11-25 16:50:52] [25-Nov-2021 16:50:51 UTC] PHP Warning:  Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) in Unknown on line 0