Summary:ASTERISK-09921: Large list of recording files produces delay on incoming calls on queues
Reporter:fugitivo (fugitivo)Labels:
Date Opened:2007-07-20 14:45:18Date Closed:2007-07-20 17:17:53
Versions:Frequency of
Description:Having a directory with a lot of recording files delays audio on queues with recordings enabled.
It seems that asterisk tries to access the directory containing all the recordings before passing audio, causing big delay on the incoming audio.
Running "ls" command on that directory produces the same delay before seeing the list of files.
Moving the files out of the monitor directory fixes the problem.

Comments:By: Russell Bryant (russell) 2007-07-20 16:25:44

This is a filesystem level issue.  There is nothing we can do about it.  Asterisk doesn't do anything special here.  All it does is create a file to start writing the recording out to.  If creating this file takes a long time because of there being a lot of files, then we can't do anything about it.

By: fugitivo (fugitivo) 2007-07-20 16:59:20

russell, thank you for your answer. I thought about what you say before adding this problem, but I wanted to write it anyways because it took me a lot of time before I realized what was causing this problem.
By the way, I don't know if it is OK that "creating a file to start writing the recording" should add delay in the audio of the incoming call.
It's like audio won't pass until the file for the recording is created, is this correct?
I think it's better to loose 5 seconds of audio in the recording and not the call itself (5 sec of silence is enough to hung up a call). I don't know if this is possible to do, but it's how it should work on extreme cases.

By: Jason Parker (jparker) 2007-07-20 17:16:47

Losing audio in the recording is absolutely the wrong thing to do.  Just my 2c..

By: Russell Bryant (russell) 2007-07-20 17:17:52

Creating a file is done by a blocking system call.  Under any normal circumstances, this very little time.  It is definitely system specific as to why it takes so long on your system.  As you pointed out, you have the same problem just trying to list the files from a shell.