Re: limits.conf: howto set core file size?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick wrote:

> Thanks for the information. I was thinking about the login you
> mentioned. The primary application I need this for is Asterisk. Like
> apache it is started as root and by passing -U <user> -G <group>
> parameters it will run as that <user>/<group> (asterisk/asterisk in my
> case). Do I still need to add the info to the initscript or do I add it
> to limits.conf?

I run a large scale Asterisk system on Fedora Core 3. I had a problem where the default number of file descriptors wasn't adequate for the number of socket connections that were being opened. Suffice it to say that I learned the information I'm passing on about ulimit and limits.conf the hard way. I make all ulimit changes in the init script AND limits.conf. That way they're applied in both of the following scenarios:

1) Asterisk is started automatically at boot.
2) Asterisk is started manually from a login prompt after a crash or maintenance downtime.

If you're planning on having a large number of concurrent calls, you should increase the maximum number of file descriptors so that you don't run into the same problem I did. This can be done by adding the following lines to limits.conf:

<user>   soft   nofile   65536
<user>   hard   nofile   65536

And adding the following line to Asterisk's init script, prior to starting Asterisk itself:

ulimit -n 65536

If security isn't a major issue, I'd recommend running Asterisk as root. There is a substantial amount of work involved in setting all of the permissions to run it properly as another user.

Here are a couple of scripts that you can use for starting Asterisk at boot and restarting it automatically if it crashes:

<http://svn.digium.com/view/asterisk/branches/1.2/contrib/init.d/rc.redhat.asterisk?rev=15615&view=markup>
<http://svn.digium.com/view/asterisk/branches/1.2/contrib/scripts/safe_asterisk?rev=21638&view=markup>

I'd be happy to continue helping you with your system, but we're getting a little off topic. I'm also an active member of the Asterisk users list <http://lists.digium.com/mailman/listinfo/asterisk-users>, so I'll keep an eye out for your posts over there. Feel free to contact me off list as well.

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux