fork: Cannot allocate memory





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







6















I am frequently getting:



fork: Cannot allocate memory


when running commands over ssh. I have 4 GB of RAM and usually 2 GB free. This started happening since I upgraded to Ubuntu 11.10.



I then need to repeatably run the command until it finishes successfully.



I'm connecting from my laptop to my server both from my home LAN. Some times happens even when I run apt-get.



Any idea why?










share|improve this question




















  • 1





    I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

    – lumbric
    Dec 21 '11 at 15:52











  • Are you running in a VPS ?

    – Panther
    Dec 21 '11 at 16:14











  • I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

    – xrado
    Dec 21 '11 at 21:58











  • I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

    – BlackDivine
    Jan 29 '12 at 20:00













  • How much memory is bash using when it happens? ps -o rss,vsize,args $$

    – geirha
    Feb 26 '12 at 21:11


















6















I am frequently getting:



fork: Cannot allocate memory


when running commands over ssh. I have 4 GB of RAM and usually 2 GB free. This started happening since I upgraded to Ubuntu 11.10.



I then need to repeatably run the command until it finishes successfully.



I'm connecting from my laptop to my server both from my home LAN. Some times happens even when I run apt-get.



Any idea why?










share|improve this question




















  • 1





    I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

    – lumbric
    Dec 21 '11 at 15:52











  • Are you running in a VPS ?

    – Panther
    Dec 21 '11 at 16:14











  • I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

    – xrado
    Dec 21 '11 at 21:58











  • I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

    – BlackDivine
    Jan 29 '12 at 20:00













  • How much memory is bash using when it happens? ps -o rss,vsize,args $$

    – geirha
    Feb 26 '12 at 21:11














6












6








6








I am frequently getting:



fork: Cannot allocate memory


when running commands over ssh. I have 4 GB of RAM and usually 2 GB free. This started happening since I upgraded to Ubuntu 11.10.



I then need to repeatably run the command until it finishes successfully.



I'm connecting from my laptop to my server both from my home LAN. Some times happens even when I run apt-get.



Any idea why?










share|improve this question
















I am frequently getting:



fork: Cannot allocate memory


when running commands over ssh. I have 4 GB of RAM and usually 2 GB free. This started happening since I upgraded to Ubuntu 11.10.



I then need to repeatably run the command until it finishes successfully.



I'm connecting from my laptop to my server both from my home LAN. Some times happens even when I run apt-get.



Any idea why?







command-line ssh ram






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 8 '13 at 4:09









edwin

3,3181530




3,3181530










asked Dec 21 '11 at 13:24









xradoxrado

131113




131113








  • 1





    I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

    – lumbric
    Dec 21 '11 at 15:52











  • Are you running in a VPS ?

    – Panther
    Dec 21 '11 at 16:14











  • I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

    – xrado
    Dec 21 '11 at 21:58











  • I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

    – BlackDivine
    Jan 29 '12 at 20:00













  • How much memory is bash using when it happens? ps -o rss,vsize,args $$

    – geirha
    Feb 26 '12 at 21:11














  • 1





    I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

    – lumbric
    Dec 21 '11 at 15:52











  • Are you running in a VPS ?

    – Panther
    Dec 21 '11 at 16:14











  • I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

    – xrado
    Dec 21 '11 at 21:58











  • I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

    – BlackDivine
    Jan 29 '12 at 20:00













  • How much memory is bash using when it happens? ps -o rss,vsize,args $$

    – geirha
    Feb 26 '12 at 21:11








1




1





I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

– lumbric
Dec 21 '11 at 15:52





I think you have to provide more details otherwise this won't be solveable. I suppose the machine you are describing is the ssh server you are connecting to? (and not the client) When this happens run free and post the output here (and what program caused the error)

– lumbric
Dec 21 '11 at 15:52













Are you running in a VPS ?

– Panther
Dec 21 '11 at 16:14





Are you running in a VPS ?

– Panther
Dec 21 '11 at 16:14













I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

– xrado
Dec 21 '11 at 21:58





I'm connecting from my laptop to my server both in home lan. Some times happens even when I run apt-get. I'll check free next time.

– xrado
Dec 21 '11 at 21:58













I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

– BlackDivine
Jan 29 '12 at 20:00







I am getting exactly same problem, also lots of others. See this: ubuntuforums.org/showthread.php?p=11649751

– BlackDivine
Jan 29 '12 at 20:00















How much memory is bash using when it happens? ps -o rss,vsize,args $$

– geirha
Feb 26 '12 at 21:11





How much memory is bash using when it happens? ps -o rss,vsize,args $$

– geirha
Feb 26 '12 at 21:11










2 Answers
2






active

oldest

votes


















1














Can you provide us with the output of ulimit -a ran in a session where this happens?



/etc/pam.d/sshd should involve pam_limits.so when you open a session. This module will use /etc/security/limits.conf to apply various restrictions to your session, including regarding memory usage.






share|improve this answer































    0














    I was getting this error when attempting to run top while my swap partition was not active (0 swap memory) and it was resolved by enabling swap on /dev/sda5:



    swapon /dev/sda5





    share|improve this answer


























    • Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

      – J. Starnes
      Nov 24 '17 at 5:36












    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',
    autoActivateHeartbeat: false,
    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%2f89495%2ffork-cannot-allocate-memory%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Can you provide us with the output of ulimit -a ran in a session where this happens?



    /etc/pam.d/sshd should involve pam_limits.so when you open a session. This module will use /etc/security/limits.conf to apply various restrictions to your session, including regarding memory usage.






    share|improve this answer




























      1














      Can you provide us with the output of ulimit -a ran in a session where this happens?



      /etc/pam.d/sshd should involve pam_limits.so when you open a session. This module will use /etc/security/limits.conf to apply various restrictions to your session, including regarding memory usage.






      share|improve this answer


























        1












        1








        1







        Can you provide us with the output of ulimit -a ran in a session where this happens?



        /etc/pam.d/sshd should involve pam_limits.so when you open a session. This module will use /etc/security/limits.conf to apply various restrictions to your session, including regarding memory usage.






        share|improve this answer













        Can you provide us with the output of ulimit -a ran in a session where this happens?



        /etc/pam.d/sshd should involve pam_limits.so when you open a session. This module will use /etc/security/limits.conf to apply various restrictions to your session, including regarding memory usage.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 3 '12 at 17:05









        Pierre CarrierPierre Carrier

        1,03588




        1,03588

























            0














            I was getting this error when attempting to run top while my swap partition was not active (0 swap memory) and it was resolved by enabling swap on /dev/sda5:



            swapon /dev/sda5





            share|improve this answer


























            • Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

              – J. Starnes
              Nov 24 '17 at 5:36
















            0














            I was getting this error when attempting to run top while my swap partition was not active (0 swap memory) and it was resolved by enabling swap on /dev/sda5:



            swapon /dev/sda5





            share|improve this answer


























            • Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

              – J. Starnes
              Nov 24 '17 at 5:36














            0












            0








            0







            I was getting this error when attempting to run top while my swap partition was not active (0 swap memory) and it was resolved by enabling swap on /dev/sda5:



            swapon /dev/sda5





            share|improve this answer















            I was getting this error when attempting to run top while my swap partition was not active (0 swap memory) and it was resolved by enabling swap on /dev/sda5:



            swapon /dev/sda5






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 25 at 15:15

























            answered Nov 24 '17 at 1:20









            AlandroidAlandroid

            112




            112













            • Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

              – J. Starnes
              Nov 24 '17 at 5:36



















            • Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

              – J. Starnes
              Nov 24 '17 at 5:36

















            Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

            – J. Starnes
            Nov 24 '17 at 5:36





            Welcome to askubuntu. You could improve your answer by including an example command to enable swap. From review.

            – J. Starnes
            Nov 24 '17 at 5:36


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f89495%2ffork-cannot-allocate-memory%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

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局