https://rethinkdb.com/blog/handling-stack-overflow-on-custom-stacks/

https://barrgroup.com/embedded-systems/how-to/prevent-detect-stack-overflow 

etc.
{
    LOG_DEBUG(log, "Setting up {} to store temporary data in it", path);
    Poco::File(path).createDirectories();
    
    Poco::DirectoryIterator dir_end;
    for (Poco::DirectoryIterator it(path); it != dir_end; ++it)
    {
        if (it->isFile() && startsWith(it.name(), "tmp"))
        {
            LOG_DEBUG(log, "Removing old temporary file {}", it->path());
            it->remove();
        }
        else
            LOG_DEBUG(log, "Skipped file in temporary path {}", it->path());
    }
}
int waitServersToFinish(std::vector<DB::ProtocolServerAdapter> & servers, size_t seconds_to_wait)
{
    const int sleep_max_ms = 1000 * seconds_to_wait;
    const int sleep_one_ms = 100;
    int sleep_current_ms = 0;
    int current_connections = 0;
    while (sleep_current_ms < sleep_max_ms)