Easiest thing (as long as filedescriptors are being closed properly) is to increase the number of allowed open files: /proc/sys/fs/file-max This file defines a system-wide limit on the number of open files for all processes. (See also setrlimit(2), which can be used by a process to set the per-process limit, RLIMIT_NOFILE, on the number of files it may open.) If you get lots of error messages about running out of file handles, try increasing this value: echo 100000 > /proc/sys/fs/file-max The kernel constant NR_OPEN imposes an upper limit on the value that may be placed in file-max. If you increase /proc/sys/fs/file-max, be sure to increase /proc/sys/fs/inode-max to 3-4 times the new value of /proc/sys/fs/file-max, or you will run out of inodes. On Wed, 2004-12-08 at 16:26 -0500, Eric wrote:> My asterisk process produced the following errors this morning: > > Dec 8 10:44:07 WARNING[50315282]: rtp.c:829 ast_rtp_new_with_bindaddr: Unable to allocate socket: Too many open files > Dec 8 10:44:07 WARNING[50315282]: chan_sip.c:2352 sip_alloc: Unable to create RTP session: Too many open files > Dec 8 10:44:07 WARNING[50315282]: chan_sip.c:8024 sip_request: Unable to build sip pvt data for 'xxxxxxxxxx@sip0' > Dec 8 10:44:07 NOTICE[50315282]: app_dial.c:743 dial_exec: Unable to create channel of type 'SIP' > > I don't think it's related to the unreachable peer thing from last year, > this machine only has one peer and a TE405p acting as a pure PSTN gateway. > > I restarted the process to fix the problem, however, I was wondering if > anyone saw this problem with 1.0.1, and if so, any chance it was fixed > for 1.0.2 or 1.0.3? > > Thanks. > > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
My asterisk process produced the following errors this morning: Dec 8 10:44:07 WARNING[50315282]: rtp.c:829 ast_rtp_new_with_bindaddr: Unable to allocate socket: Too many open files Dec 8 10:44:07 WARNING[50315282]: chan_sip.c:2352 sip_alloc: Unable to create RTP session: Too many open files Dec 8 10:44:07 WARNING[50315282]: chan_sip.c:8024 sip_request: Unable to build sip pvt data for 'xxxxxxxxxx@sip0' Dec 8 10:44:07 NOTICE[50315282]: app_dial.c:743 dial_exec: Unable to create channel of type 'SIP' I don't think it's related to the unreachable peer thing from last year, this machine only has one peer and a TE405p acting as a pure PSTN gateway. I restarted the process to fix the problem, however, I was wondering if anyone saw this problem with 1.0.1, and if so, any chance it was fixed for 1.0.2 or 1.0.3? Thanks.
Asterisk does not do anything in this vein. Simply % echo <somevalue> > /proc/sys/fs/file-max a good starting point for this value would be double your existing value. % cat /proc/sys/fs/file-nr will give you your existing max files. I would also suggest doubling your inodes as well. % cat /proc/sys/fs/inode-nr cat /proc/sys/fs/inode-max controls this data. (Although some kernels no longer support max inodes). Try looking at "man proc" and search on file. Sean On Thu, 2004-12-09 at 09:30 +0100, Roy Sigurd Karlsbakk wrote:> ulimit
Roy Sigurd Karlsbakk
2004-Dec-09 01:30 UTC
[Asterisk-Users] Asterisk 1.0.1 Too many open files
> /proc/sys/fs/file-max > This file defines a system-wide limit on the number of open > files for all processes. (See also setrlimit(2), which can be > used by a process to set the per-process limit, RLIMIT_NOFILE, > on the number of files it may open.) If you get lots of error > messages about running out of file handles, try increasing this > value:Does asterisk set this itself or do I have to use ulimit something to do it manually?