YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
44 stars 15 forks source link

PHP Fatal error: Out of memory #115

Closed celophan closed 4 years ago

celophan commented 4 years ago

I'm on a VPS with 2 GB of RAM. I had those errors while trying to upgrade pixelfed from de 0.10.9-ynh1 to 0.10.9-ynh2.

PHP Fatal error: Out of memory (allocated 1191718912) (tried to allocate 33554432 bytes) in phar:///var/www/pixelfed/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

Here is the complete log of the operation : https://paste.yunohost.org/raw/etapunanat I already had this kind of error before but it was resolved by creating a swap file. But now I have the swap file (2GB) and it seems ok :

swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   -1

free -h
              total        used        free      shared  buff/cache   available
Mem:           1.9G        620M        642M         65M        693M        1.1G
Swap:          2.0G          0B        2.0G
yalh76 commented 4 years ago

Maybe you should try to reboot your vps before upgrading or add more swap...

celophan commented 4 years ago

It worked with 3 GB swap, thank you.

lapineige commented 4 years ago

Quick tip to avoid swapping, you can try to install zram (https://wiki.debian.org/ZRam). It might improve performance by reducing the need of the physical swap, and virtually increasing RAM space.