I am hosting a WP blog on dokku, but there are stability issues, I suspect memory so I want to increase memory available to PHP, specifically, to set custom memory_limit
value.
I am running on dokku v0.5.6
, and using BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php#102
To debug the PHP settings of my blog
app I run
dokku run blog php -ini | grep memory_limit
#=> memory_limit => 128M => 128M
I have followed the suggestions in
Specifically:
.user.ini
with memory_limit = 256M
fmp_custom.ini
with content php_value[memory_limit] = 256M
php_custom.ini
with content memory_limit = 256M
Procfile
with web: vendor/bin/heroku-php-nginx -C nginx.conf -F fpm_custom.ini -i php_custom.ini
/conf/php/php.ini
with content memory_limit = 256M
Neither strategy has yielded the desired output of
dokku run blog php -ini | grep memory_limit
#=> memory_limit => 256M => 256M
What am I missing? I am doubtful that nothing has affected PHP init settings, perhaps I am debugging incorrectly?
All the custom settings are related to the current thread of the app server process. In other words, if you check the phpInfo()
output you can see that your php_custom.ini
works as expected:
https://www.dropbox.com/s/u4pe88pcpkwl6rm/2016-06-05_0.10.51.png?dl=0
but the php -ini | grep memory_limit
is still show you 128MB, because the php call spawns a new thread, especially if you run another container of your app.