meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

g_thread_pool_set_max_idle_time #3084

Closed wan721 closed 2 years ago

wan721 commented 2 years ago

https://github.com/meetecho/janus-gateway/blob/cffad3c54eb046ddc457e145ff899d4866d08b6b/src/janus.c#L5352

If we're not using AddressSanitizer, should we comment out this line or set it to a smaller value (in my system the default is 15 seconds).

lminiero commented 2 years ago

Apparently this was explicitly raised to 120: see #663 for details. I don't think we have a way to detect AddressSanitizer at compile time, so I doubt this can be made programmatically configurable.

atoppi commented 2 years ago

@wan721 did you encounter any issue due to that timeout setting being too high? I can see potential problems with bursts of requests in a short time and unlimited pool size, is that your case?

I don't think we have a way to detect AddressSanitizer at compile time

fwiw asan can be detected through macros on both gcc and clang

wan721 commented 2 years ago

@wan721 did you encounter any issue due to that timeout setting being too high? I can see potential problems with bursts of requests in a short time and unlimited pool size, is that your case?

I don't think we have a way to detect AddressSanitizer at compile time

fwiw asan can be detected through macros on both gcc and clang

#ifdef __SANITIZE_ADDRESS__
// code that builds only under AddressSanitizer
#endif
#if defined(__has_feature)
#  if __has_feature(address_sanitizer)
// code that builds only under AddressSanitizer
#  endif
#endif

Thanks for the suggestion! We will try that code.

lminiero commented 2 years ago

I got a mail about a post I don't see listed here, which mentioned an Error creating thread: Resource temporarily unavailable as one of the causes to revise this. Make sure you're setting ulimit accordingly: https://janus.conf.meetecho.com/docs/FAQ.html#ulimit