mirror of
https://github.com/Icinga/icinga2.git
synced 2026-07-16 12:13:06 -04:00
Adjust RLIMITs after freezing Configuration namespace
Adjust resource limits only after freezing the `Configuration` to account for any user-provided overrides via the `-D/--define` command line option. Previously, resource limits were adjusted before processing command line options, and any user-provided overrides were accepted but not applied. Now, a command like this one works as intended and used 32 as the stack limit instead of the 64 provided as env var: $ ICINGA2_RLIMIT_STACK=64 icinga2 daemon -DConfiguration.RLimitStack=32
This commit is contained in:
parent
d49b10bde6
commit
4d30b03c0f
1 changed files with 4 additions and 3 deletions
|
|
@ -281,9 +281,6 @@ static int Main()
|
|||
#endif /* RLIMIT_STACK */
|
||||
}
|
||||
|
||||
if (!autocomplete)
|
||||
Application::SetResourceLimits();
|
||||
|
||||
LogSeverity logLevel = Logger::GetConsoleLogSeverity();
|
||||
Logger::SetConsoleLogSeverity(LogWarning);
|
||||
|
||||
|
|
@ -442,6 +439,10 @@ static int Main()
|
|||
Configuration::Concurrency = std::thread::hardware_concurrency();
|
||||
}
|
||||
|
||||
if (!autocomplete) {
|
||||
Application::SetResourceLimits();
|
||||
}
|
||||
|
||||
Application::GetTP().Restart();
|
||||
|
||||
/* Ensure that all defined constants work in the way we expect them. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue