v.23.11Improvement

Server Exit Codes Updated to Reflect Specific Exceptions

The server's exit code will correspond to the exception code. For example, if the server cannot start due to memory limit, it will exit with the code 241 = MEMORY_LIMIT_EXCEEDED. In previous versions, the exit code for exceptions was always 70 = Poco::Util::ExitCode::EXIT_SOFTWARE. #57153 (Alexey Milovidov).
ClickHouse server now returns specific exit codes corresponding to different exception types instead of a generic exit code.

Why it matters

Previously, the ClickHouse server always exited with a generic code (70) on exceptions, which made it difficult to determine the exact reason for the failure. This feature adds specific exit codes, such as 241 for memory limit exceeded, enabling better diagnostics and automated handling based on the precise cause of server exit.

How to use it

No explicit user action is required to enable this feature. When the ClickHouse server encounters an exception on startup or runtime, it will automatically exit with the corresponding specific exit code indicating the type of error.