Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do i increase the file limit for the asterisk daemon on my ubuntu computer? When I login as root and use the ulimit, it says unlimited already. I can't login as asterisk because that user doesn't have shell access, it's just a daemon.

I can see in /proc/<asterisk proc id>/limits the current Max open files is 1024. I want to double that.

I even went into /etc/security/limit.conf and added

asterisk soft nofile 2048
asterisk hard nofile 2048
@asterisk soft nofile 2048
@asterisk hard nofile 2048

THen I reboot server. Still, the max open files is 1024.

What else can I do?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You could always edit the /etc/init.d/asterisk file and prepend ulimit -n 2048 to the top.

This is the same process that MySQL, Varnish and a few others use.

share|improve this answer
    
superb!!! it wored –  John May 18 '13 at 12:28
add comment

I had this exact issue for anyone stumbling across this in the future (is it chrome?)

The system that I was having the issue on was Debian rather than Ubuntu, but hey, close enough.

I had to use the following in '/etc/security/limits.conf' to get it working, as specifying the user & group didn't work.

*               soft    nofile          10240
*               hard    nofile          10240

Logging in and out again applies this change.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.