It happens often that when migrating from php-fcgi to php-fpm that the right group id is not retrieved.
/var/log/php5-fpm.log
[12-Jun-2017 11:04:35] ERROR: [pool 13389002531805] cannot get gid for group ‘domain’
where domain should be domain.com
the file /etc/php5/fpm/pool.d/13389002531805.conf must be changed by hand from
[13389002531805]
user = domain.com
group = domain
listen = 8002
pm = dynamic
pm.max_children = 9999
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/domain.com/tmp
php_admin_value[session.save_path] = /home/domain.com/tmp
php_value[max_execution_time] = 60
TO -->
[13389002531805]
user = domain.com
group = domain.com
listen = 8002
pm = dynamic
pm.max_children = 9999
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/domain.com/tmp
php_admin_value[session.save_path] = /home/domain.com/tmp
php_value[max_execution_time] = 60