Skip to content

Commit

Permalink
Merge pull request #7713 from Icinga/bugfix/coroutine-stack-size-linux
Browse files Browse the repository at this point in the history
Boost Coroutines: Increase the default stack size from 64 to 256KB
  • Loading branch information
Michael Friedrich authored Dec 13, 2019
2 parents 5484d12 + f62f2eb commit cd44c53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/base/io-engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ class IoEngine
// Rationale: Low cost Windows agent only & https://github.com/Icinga/icinga2/issues/7431
return 8 * 1024 * 1024;
#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 */
}

Expand Down

0 comments on commit cd44c53

Please sign in to comment.