PHP Memory Limit (EN / FR)

ENGLISH

Hello

I’ve some issues with my websites on yunohost, i use Grav, Wordpress, etc…
My website https://karma-kusala.com have a white front end. (I use Grav CMS for this one)

So i’ve modified the memory_limit on /etc/php5/fpm but the is no effect on my website, i’ve put a phpinfo file to have informations https://karma-kusala.com/info.php

I don’t know what to do :’(

FRANCAIS

Bonjour,

j’ai de petits soucis avec certains de mes sites qui affichait un front end tout blanc.

J’ai donc modifié la memory limit de php dans etc/php5/fpm
Mais après avoir ajouté un fichier d’info php à la racine de mes sites, je vois que je suis a 30M
https://karma-kusala.com/info.php

J’aimerais résoudre ce soucis mais je ne sais pas ou augmenter cette memory limit de php ailleurs que là ou je l’ai déjà fait. (je l’ai mis a -1 pour illimité mais j’avais testé d’autres valeurs hautes auparavant)

I think you will also need to add client_max_body_size 20M; in the /etc/nginx/conf.d/yourdomain.tld.d/grav.conf

1 Like

Interesting, i’ve try to modify this and i search some informations and tutorials but it change nothing :’(

you found solution ? i think i have same problem …

Did you tried adding the client_max_body_size 20M as said in PHP Memory Limit (EN / FR) - #2 by kanhu

i use wordpress and i already have already client_max_body_size 30m;

shall i change it to smaller value ?

extracts from php-info

memory_limit 30M 30M
post_max_size 30M 30M

(for some reason i don’t see “body” in php-info, but i guess it is not a problem)

i fixed my issue , there was another ini file that was overriding the setting from /etc/php5/fpm/php.ini

so once i deleted memory_limit = 30M from that file

the memory_limit = 128M started to be take in consideration

1 Like

It’s good if your problem was solved. This also happened with me, first i was also trying to increase the memory_limit but due to another .ini file the changes will not be appeared. If any such kind of problem persists then first you have to check all the .ini files (php.ini, user.ini) and also check for .htaccess file.

.htaccess ??

why .htaccess ? AFAIK, it is not used by nginx

i had another phpmemory limit error,

from my understanding each time when we install an app => the new .ini file is created
and this file will override perviously set memory limit

don’t you think that it can bring troubles to our installs ?

Hi,
Could you please tell us which file you edited?
I have the same issue with wallabag… Thanks.

my previous experience was that if you have 20-wordpress__2.ini and then you install 20-wordpress__3.ini your value defined in 20-wordpress__2.ini is overrided/

so i always edit the last file that is loaded in php (Additional .ini files parsed)
you can see the order of loaded files via phpinfo()

I’ve found custom PHP configuration files here:

/etc/php/7.0/fpm/pool.d

Indeed, I have found that I need to modify at the very end of

sudo nano /etc/php/7.3/fpm/pool.d/wordpress.conf

these three value

php_admin_value[upload_max_filesize] = 50M
php_admin_value[memory_limit] = 64M
php_admin_value[post_max_size] = 50M
1 Like

Thanks a lot !