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




  1. first request is compiling the sources and reading the files

  2. second started in parallel, which means php start second process where can be read same files

  3. 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?










share|improve this question


























    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




    1. first request is compiling the sources and reading the files

    2. second started in parallel, which means php start second process where can be read same files

    3. 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?










    share|improve this question
























      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




      1. first request is compiling the sources and reading the files

      2. second started in parallel, which means php start second process where can be read same files

      3. 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?










      share|improve this question













      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




      1. first request is compiling the sources and reading the files

      2. second started in parallel, which means php start second process where can be read same files

      3. 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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 16 '17 at 9:20









      Misha Medgitov

      61




      61






















          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






          share|improve this answer








          New contributor




          Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            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

























            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






            share|improve this answer








            New contributor




            Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






















              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






              share|improve this answer








              New contributor




              Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                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






                share|improve this answer








                New contributor




                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                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







                share|improve this answer








                New contributor




                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Nov 21 at 10:49









                Evgeny Anikiev

                11




                11




                New contributor




                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Evgeny Anikiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕