Failed to create temporary storage

Hello

We intensively use Asterisk ARI /bridges/{bridgeId}/play method for playing external files using http/https, sometimes we’ve experienced an issue that files stop playing with errors in log:

[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_http_media_cache.c: Failed to create temporary storage for 'http://.wav’
[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_http_media_cache.c: Failed to create temporary storage for 'http://
.wav’
[Sep 3 11:45:34] WARNING[45902][C-0000001a] file.c: File http://
.wav does not exist in any format
[Sep 3 11:45:34] WARNING[45902][C-0000001a] file.c: Unable to open http://
**.wav (format (slin)): No such file or directory
[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_stasis_playback.c: 1567500334.252: Playback failed for sound:http://***.wav

After reboot server and some time about 1 hours the error disappears and everything work as expected.

Disk space is sufficient.

I would be really appreciated for any help!

Thanks
Volodymyr

This occurs when the call to “mkstemp” which makes a temporary file fails. These would be created in /tmp. What is the state of the directory?

Thanks for reply,
Files created in the /tmp dir,
What should I do to prevent this behave?

Thanks
Volodymyr

I understand they are there - but are there a lot? If you remove some does it resolve the problem while in operation?

Yes a lot, and we have a cron that removes them every hour but only which are 60 min old.
But in one moment asterisk stop playing with the error. The problem resolves only if reboot a server and wait for an hour and more.

So have you tried explicitly removing files when it occurs and then seen if it still can’t create a temporary file?

We have not, but what is the root cause of the problem?

The mkstemp function[1] returned failure. Why that is you would need to examine further, it’s entirely possible you had so many files that it couldn’t generate a new random one.

[1] http://man7.org/linux/man-pages/man3/mkstemp.3.html

According to the source of mkstemp function there are 62^3 possible names. I’m not sure that we create so many files.
Is there any way to remove these temporary cache using ARI, I cannot find, the playback methods can only stop playing but not deleting?

Thanks a lot for your answers!

No, there is no mechanism to do so.

Thank you!
we’ll continue investigate what really happens there.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.