-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx crash with many requests #25
Comments
did you saw these errors before the pull request? |
other question, are you caching the results of this location? what do you mean by many requests? |
Hi Flavio, I have this nginx server behind varnish. But we have 5 varnish farms (diferent cdn providers). When we have more of 3 simultaneous request to the same audio file, the nginx crash. I think that my installation of av libs don't have thread support (seems Ubuntu forgot add the --threads flag when compiled). I'm trying with mutex before and after free context ... I'll tell you how works. If this not work, I will try with av_lockmgr_register (http://ffmpeg.org/doxygen/trunk/group__lavc__misc.html#gae120ec60cdf49cf0f793eff3ec731bcc) on module init j |
Hi Flavio, But, I've been thinking about this, and I think that the best solution is create one init function for the module and move the av_register_all and av_log_set_level. And, in this module init function add the av_lockmgr_register. What think about this ? thanks |
hi @jalonsoa, sounds good to me. I'm still surprised that I hadn't face this problem here. Have you tried compiling your libav with threads? Just curious, can you tell me how many RPM nginx can serve with this mutex? |
Hi Flavio, On this server, all request = 1751 RPM, only audio.ts related, 115 RPM j On Fri, Jan 16, 2015 at 1:26 PM, Flávio Ribeiro [email protected]
|
It's ok for me @jalonsoa, can you make another pull request? |
add yourself on AUTHORS file also 🍻 |
Hi Flavio, I'm trying to update my libav libs to ensure support of threads or solve bugs in libav libs. I will tell you about progress on this way. j |
great, thank you for making me updated. |
hey @jalonsoa any updates on this? |
Hi Flavio, Any idea ? (gdb) bt On Tue, Jan 27, 2015 at 5:50 PM, Flávio Ribeiro [email protected]
|
I try this week without the patchs about lock manager j On Wed, Jan 28, 2015 at 1:44 PM, Justo Alonso [email protected]
|
I think we can go ahead with lock manager. |
Hi Flavio, I'm preparing a patch to send you a patch ... thanks ! On Wed, Jan 28, 2015 at 4:57 PM, Flávio Ribeiro [email protected]
|
Awesome, thanks 🍻 |
Hi Flavio,
It crash freeing pointer from s->priv_data (s is the input_format_context). Reading the docs from libav, the priv_data holds information about options, only if codecs need it. I don't known about my input ts files (generates by nginx-rtmp module) need thes structs and your files don't need (or don't crash here). This is the info from AVFormatContext when crash
and the priv_data before free it
What do you think about this ? |
Hi
the nginx crash when many clients request audio files. I think that this is a problem about thread safe.
Are av libraries (avformat, avcodec and avutil) thread safe ?
the bt on nginx crash:
The text was updated successfully, but these errors were encountered: