I am using ubuntu on vmware virtual machine for testing my php projects. I have there installed nginx, php7.0-fpm, mysql.
My shares are located on windows 10 and mounted to virtual machine using cifs and fstab:
//192.168.100.1/projects /mnt/projects cifs credentials=/home/magic/.smbcredentials,cache=none,file_mode=0777,dir_mode=0777,noperm,rsize=16384,wsize=16384,noacl,sec=ntlm,nobrl 0 0
It works great most of the time. But on big project, where many file has to be read for compilation, I am getting input/output error during php script life:
Warning: include(/mnt/projects/magento2/magento2/vendor/magento/framework/Component/ComponentRegistrarInterface.php): failed to open stream: Input/output error in /mnt/projects/magento2/magento2/vendor/composer/ClassLoader.php on line 444
The error linking to random file each time. Usually problem happens when there is multiple requests coming to php-fpm. for example
- first request is compiling the sources and reading the files
- second started in parallel, which means php start second process where can be read same files
- compilation process are fails in both above prcocesses at random stage
The problem not happens when there is no concurrent php requests. So when there is just single request - php successfully completes compilation work. (not often, but in single request the error also happens)
It behaves like the error coming from netwrok level. Something killing the file read process when new file read request detected.
I was digging into samba configuration, cifs configuration. Upgraded to latest version cifs-utils and samba. But did not got any success still.
All what I was able to do is just limit php fpm processes to 1. Which is not good decision because even with one child - the error happens some time.
Is there a way to find out what causing this or to solve this?