Server info: Ubuntu Server, Nginx, PHP FPM
in /etc/php5/fpm/php.ini I have: memory_limit = 512M in /etc/php5/fpm/php-fpm.conf
/etc/php5/fpm/php.ini
memory_limit = 512M
/etc/php5/fpm/php-fpm.conf
Ok this is daft but I had memory_limit set to 2GB, which isn't understood. When I changed that to 2000M it worked!