Debian increase ulimit for Asterisk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I've been facing an issue with Asterisk 13.11.2 on Debian 8 where it's crashing after reaching the limit of open files



bridge_channel.c: Can't create pipe! Try increasing max file descriptors with ulimit -n


I have managed to increase the limit from 65536 to 150000 using the /etc/security/limits.conf



I have added the following:



root soft nofile 150000
root hard nofile 150000
* soft nofile 150000
* hard nofile 150000


The result of ulimit -n is now 150000



When i try check the limit for the Asterisk process cat /proc/xxx/limits



I still get the old limit!



Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31945 31945 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31945 31945 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us


How to solve this?










share|improve this question























  • If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
    – Thomas
    Oct 4 '16 at 9:54











  • restart asterisk to make changes of ulimit available (for the new process)
    – Romeo Ninov
    Oct 4 '16 at 12:47










  • @RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
    – TareKhoury
    Oct 4 '16 at 12:55










  • @TareKhoury is this 64 bit OS? And do you restart it by hand?
    – Romeo Ninov
    Oct 4 '16 at 14:24















up vote
0
down vote

favorite












I've been facing an issue with Asterisk 13.11.2 on Debian 8 where it's crashing after reaching the limit of open files



bridge_channel.c: Can't create pipe! Try increasing max file descriptors with ulimit -n


I have managed to increase the limit from 65536 to 150000 using the /etc/security/limits.conf



I have added the following:



root soft nofile 150000
root hard nofile 150000
* soft nofile 150000
* hard nofile 150000


The result of ulimit -n is now 150000



When i try check the limit for the Asterisk process cat /proc/xxx/limits



I still get the old limit!



Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31945 31945 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31945 31945 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us


How to solve this?










share|improve this question























  • If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
    – Thomas
    Oct 4 '16 at 9:54











  • restart asterisk to make changes of ulimit available (for the new process)
    – Romeo Ninov
    Oct 4 '16 at 12:47










  • @RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
    – TareKhoury
    Oct 4 '16 at 12:55










  • @TareKhoury is this 64 bit OS? And do you restart it by hand?
    – Romeo Ninov
    Oct 4 '16 at 14:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've been facing an issue with Asterisk 13.11.2 on Debian 8 where it's crashing after reaching the limit of open files



bridge_channel.c: Can't create pipe! Try increasing max file descriptors with ulimit -n


I have managed to increase the limit from 65536 to 150000 using the /etc/security/limits.conf



I have added the following:



root soft nofile 150000
root hard nofile 150000
* soft nofile 150000
* hard nofile 150000


The result of ulimit -n is now 150000



When i try check the limit for the Asterisk process cat /proc/xxx/limits



I still get the old limit!



Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31945 31945 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31945 31945 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us


How to solve this?










share|improve this question















I've been facing an issue with Asterisk 13.11.2 on Debian 8 where it's crashing after reaching the limit of open files



bridge_channel.c: Can't create pipe! Try increasing max file descriptors with ulimit -n


I have managed to increase the limit from 65536 to 150000 using the /etc/security/limits.conf



I have added the following:



root soft nofile 150000
root hard nofile 150000
* soft nofile 150000
* hard nofile 150000


The result of ulimit -n is now 150000



When i try check the limit for the Asterisk process cat /proc/xxx/limits



I still get the old limit!



Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31945 31945 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31945 31945 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us


How to solve this?







debian ulimit asterisk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 4 '16 at 10:05









Thomas

3,65151225




3,65151225










asked Oct 4 '16 at 8:54









TareKhoury

1012




1012











  • If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
    – Thomas
    Oct 4 '16 at 9:54











  • restart asterisk to make changes of ulimit available (for the new process)
    – Romeo Ninov
    Oct 4 '16 at 12:47










  • @RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
    – TareKhoury
    Oct 4 '16 at 12:55










  • @TareKhoury is this 64 bit OS? And do you restart it by hand?
    – Romeo Ninov
    Oct 4 '16 at 14:24

















  • If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
    – Thomas
    Oct 4 '16 at 9:54











  • restart asterisk to make changes of ulimit available (for the new process)
    – Romeo Ninov
    Oct 4 '16 at 12:47










  • @RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
    – TareKhoury
    Oct 4 '16 at 12:55










  • @TareKhoury is this 64 bit OS? And do you restart it by hand?
    – Romeo Ninov
    Oct 4 '16 at 14:24
















If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
– Thomas
Oct 4 '16 at 9:54





If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script.
– Thomas
Oct 4 '16 at 9:54













restart asterisk to make changes of ulimit available (for the new process)
– Romeo Ninov
Oct 4 '16 at 12:47




restart asterisk to make changes of ulimit available (for the new process)
– Romeo Ninov
Oct 4 '16 at 12:47












@RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
– TareKhoury
Oct 4 '16 at 12:55




@RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work
– TareKhoury
Oct 4 '16 at 12:55












@TareKhoury is this 64 bit OS? And do you restart it by hand?
– Romeo Ninov
Oct 4 '16 at 14:24





@TareKhoury is this 64 bit OS? And do you restart it by hand?
– Romeo Ninov
Oct 4 '16 at 14:24











1 Answer
1






active

oldest

votes

















up vote
0
down vote













Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk



ex:
MAXFILES = 150000



save file and restart asterisk



done






share|improve this answer




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f314186%2fdebian-increase-ulimit-for-asterisk%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













    Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk



    ex:
    MAXFILES = 150000



    save file and restart asterisk



    done






    share|improve this answer
























      up vote
      0
      down vote













      Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk



      ex:
      MAXFILES = 150000



      save file and restart asterisk



      done






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk



        ex:
        MAXFILES = 150000



        save file and restart asterisk



        done






        share|improve this answer












        Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk



        ex:
        MAXFILES = 150000



        save file and restart asterisk



        done







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 at 17:13









        Manuel

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


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





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2funix.stackexchange.com%2fquestions%2f314186%2fdebian-increase-ulimit-for-asterisk%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 to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay