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

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

etc.
listen_try = true;
    }
    for (const auto & listen_host : listen_hosts)
    {
        
        createServer(listen_host, "test_keeper_server.tcp_port", listen_try, [&](UInt16 port)
        {
            Poco::Net::ServerSocket socket;
            auto address = socketBindListen(socket, listen_host, port);
            socket.setReceiveTimeout(settings.receive_timeout);
            socket.setSendTimeout(settings.send_timeout);
            servers_to_start_before_tables.emplace_back(std::make_unique<Poco::Net::TCPServer>(
                new TestKeeperTCPHandlerFactory(*this),
                server_pool,
                socket,
                new Poco::Net::TCPServerParams));
            LOG_INFO(log, "Listening for connections to fake zookeeper (tcp): {}", address.toString());
        });
    }
    for (auto & server : servers_to_start_before_tables)
        server.start();
    SCOPE_EXIT({
        /** Ask to cancel background jobs all table engines,
          *  and also query_log.
          * It is important to do early, not in destructor of Context, because
          *  table engines could use Context on destroy.
          */
        LOG_INFO(log, "Shutting down storages.");
        global_context->shutdown();
        LOG_DEBUG(log, "Shut down storages.");