Merge pull request #7713 from Icinga/bugfix/coroutine-stack-size-linux

Boost Coroutines: Increase the default stack size from 64 to 256KB
This commit is contained in:
Michael Friedrich 2019-12-13 17:30:23 +01:00 committed by GitHub
commit cd44c5371a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -107,7 +107,10 @@ public:
// Rationale: Low cost Windows agent only & https://github.com/Icinga/icinga2/issues/7431 // Rationale: Low cost Windows agent only & https://github.com/Icinga/icinga2/issues/7431
return 8 * 1024 * 1024; return 8 * 1024 * 1024;
#else /* _WIN32 */ #else /* _WIN32 */
return boost::coroutines::stack_allocator::traits_type::default_size(); // Default 64 KB // Increase the stack size for Linux/Unix coroutines for many JSON objects on the stack.
// This may help mitigate possible stack overflows. https://github.com/Icinga/icinga2/issues/7532
return 256 * 1024;
//return boost::coroutines::stack_allocator::traits_type::default_size(); // Default 64 KB
#endif /* _WIN32 */ #endif /* _WIN32 */
} }