I just installed a clean LEMP stack on a droplet on digital ocean. Everything seems te be working fine. It I notice that if I do something on the command line with php. I will get a php fatal error about memory exhausted:
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 65536 bytes) in Unknown on line 0
I tried rebooting the system and run the commands immediately. Still the same problem. I also changed the memory limit from the default 128M to 265M. which is also reflected by phpinfo().
Finally, the free command shows that there is memory left, and also swap is enabled:
total used free shared buffers cached
Mem: 501792 468888 32904 5412 68584 253116
-/+ buffers/cache: 147188 354604
Swap: 1048572 4396
Did I do something wrong with the php5-fpm configuration? I usually work with a LAMP stack ... so I don't know if this is nginx php5-fpm specific.