Hi there
Thank you for your updates! Glad to hear that you were able to fix that previous issue (with WSL 2 thing).
About the max_execution_time
, if you create a simple php script in your site’s folder (which contains: <?php phpinfo(); ?>
code) and load / call that PHP file on your browser, it will show the value of the max_execution_time
variable as 300 by default.
If you want to increase that more than 300 (e.g.: to double it or more), you could go to your DevKinsta → Sites → site name in question → click the wrench icon (on the left side) → scroll down and locate the “PHP.ini Editor” .
There you can add this line in that editor, for example: max_execution_time=600
(and click the “Save changes” button)
Then if you refresh your browser for that phpinfo() page, that variable should now have increased to that new value you set. Like the following for example:
As for the PHP Workers, in order to change/increase that value you can do the following:
-
Go to your Docker Desktop, and click on the “Containers” section, and click the container name “devkinsta_fpm” (in the Name column)
-
In that “dev_kinstafpm” container page, click on the “Terminal tab”.
Then type the following commands (1 by 1):
sudo apt-get update
sudo apt-get install nano
nano /etc/php/8.0/fpm/pool.d/www.conf
(replace the8.0
with the actual PHP version you use for this local site in DevKinsta)
it will show something like this:
-
You may want to update that
pm.max_children
higher than the current number shows there (as per my example above it’s currently set to8
) -
Once you change that with new number, save it by pressing Control O (in that nano editor)
-
Then exit the nano editor by pressing Control X
Still in that devkinsta_fpm container’s terminal, you can type this command to make sure that has been saved/changed properly:
grep "max_children" /etc/php/8.0/fpm/pool.d/www.conf
-
After that, you just need to restart that devkinsta_fpm container.
Still on that same page, click on the “refresh” icon/button to restart that container
Done, the PHP Workers for that specific PHP version should now have been increased already.
You may then try to access the site again and see if it’s no longer showing 504 gateway timeout. If it’s still timing out (504), you may want to try to increase more (with the above steps and try again).
Regards,
Agus