Summary:ASTERISK-13513: app_playback does not seem to be closing audio files.
Reporter:Michael Cargile (mcargile)Labels:
Date Opened:2009-02-04 12:59:13.000-0600Date Closed:2011-06-07 14:02:56
Versions:Frequency of
Description:I have an application that places outbound calls via the AMI and then routes them when they pick up by AGI scripts. On every single call, I play at least one audio file back to the called party if not more, using app_playback. I currently have it calling through to another Asterisk system that is mimicking the PSTN for testing purposes.

I did two runs to see if the issue was repeatable. Fully rebooting in between.

Run 1:

After about 45 minutes of placing approximately roughly 60 calls per minute, I started to see WARNINGs from various Asterisk modules about "Too many open files". I ran "lsof -p ASTERISKPID" and saw hundreds of open gsm files. I promptly turned off my application and cleared out all open channels using "soft hangup" and the open gsm files did not go away. After 10 minutes the same number of gsm files are open. There were 963 gsm files open and 1161 total files open by the asterisk process.

Run 2:

The second time I used this watch command to see if it would actually close some files as it went along: 'watch -n2 "lsof -p ASTERISKPID > /tmp/foo; echo all; cat /tmp/foo | wc -l; echo gsm; cat /tmp/foo | grep gsm | wc -l"' I never saw the number of open gsm files go down. I did see the number of open files fluctuate though. The application ran for approximately 60 minutes and placed roughly 35 calls per minute that time. lsof -p ASTERISKPID showed 958 open gsm files and 1154 total open files when the "Too many open files" warning started popping up again.

In both cases Asterisk basically could not do anything once the file limit was reached.


This is actually Asterisk 1.6.1-rc1, but I do not see this as a selectable Asterisk Version.

I do not have this issue when I run my software with Asterisk
Comments:By: snuffy (snuffy) 2009-02-04 13:46:57.000-0600

I'm making this related to ASTERISK-13495 as it could possibly be.
Please check with latest revision of 1.6.1 or try manually applying the patch listed in ASTERISK-13495

By: Michael Cargile (mcargile) 2009-02-04 14:42:26.000-0600

I have run SVN trunk (r173458) for 15 minutes with my application and it has been closing the audio files.

By: Michael Cargile (mcargile) 2009-02-05 08:50:54.000-0600

I let my application run overnight on SVN trunk (r173458) and it currently has 215 open files of which 5 are gsm. I would say this was definitely fix.

By: Joshua C. Colp (jcolp) 2009-02-06 12:04:50.000-0600

Closed per report that this was fixed by patch from other issue.