cifs mount returns input/output error on frequent file read
up vote
1
down vote
favorite
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?
mount samba fstab cifs
add a comment |
up vote
1
down vote
favorite
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?
mount samba fstab cifs
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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?
mount samba fstab cifs
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?
mount samba fstab cifs
mount samba fstab cifs
asked Sep 16 '17 at 9:20
Misha Medgitov
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I solved similar issue by specifying protocol version 2.0
mount -t cifs -o username=user,password=passwd,vers=2.0 /host/shared /mnt/project
There are several different versions of SMB used by Windows operating systems:
- CIFS – The ancient version of SMB that was part of Microsoft Windows
NT 4.0 in 1996. SMB1 supersedes this version. - SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and
- SMB 2.0 – The version used in
Windows Vista (SP1 or later) and Windows Server 2008 - SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server
2012
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I solved similar issue by specifying protocol version 2.0
mount -t cifs -o username=user,password=passwd,vers=2.0 /host/shared /mnt/project
There are several different versions of SMB used by Windows operating systems:
- CIFS – The ancient version of SMB that was part of Microsoft Windows
NT 4.0 in 1996. SMB1 supersedes this version. - SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and
- SMB 2.0 – The version used in
Windows Vista (SP1 or later) and Windows Server 2008 - SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server
2012
New contributor
add a comment |
up vote
0
down vote
I solved similar issue by specifying protocol version 2.0
mount -t cifs -o username=user,password=passwd,vers=2.0 /host/shared /mnt/project
There are several different versions of SMB used by Windows operating systems:
- CIFS – The ancient version of SMB that was part of Microsoft Windows
NT 4.0 in 1996. SMB1 supersedes this version. - SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and
- SMB 2.0 – The version used in
Windows Vista (SP1 or later) and Windows Server 2008 - SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server
2012
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
I solved similar issue by specifying protocol version 2.0
mount -t cifs -o username=user,password=passwd,vers=2.0 /host/shared /mnt/project
There are several different versions of SMB used by Windows operating systems:
- CIFS – The ancient version of SMB that was part of Microsoft Windows
NT 4.0 in 1996. SMB1 supersedes this version. - SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and
- SMB 2.0 – The version used in
Windows Vista (SP1 or later) and Windows Server 2008 - SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server
2012
New contributor
I solved similar issue by specifying protocol version 2.0
mount -t cifs -o username=user,password=passwd,vers=2.0 /host/shared /mnt/project
There are several different versions of SMB used by Windows operating systems:
- CIFS – The ancient version of SMB that was part of Microsoft Windows
NT 4.0 in 1996. SMB1 supersedes this version. - SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and
- SMB 2.0 – The version used in
Windows Vista (SP1 or later) and Windows Server 2008 - SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server
2012
New contributor
New contributor
answered Nov 21 at 10:49
Evgeny Anikiev
11
11
New contributor
New contributor
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f956361%2fcifs-mount-returns-input-output-error-on-frequent-file-read%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown