Fix a few rough edges discovered in use of the new libevent http server:;
init: Ignore SIGPIPE
Ignore SIGPIPE on all non-win32 OSes, otherwise an unexpectedly disconnecting RPC client will terminate the application. This problem was introduced with the libhttp-based RPC server.
Fixes #6660.
http: Disable libevent debug logging, if not explicitly enabled
Add a option “-debug=libevent” to enable libevent debugging for troubleshooting. Libevent logging is redirected to our own log.
Addresses stdout spew in #6655.
rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout
The two timeouts for the server and client, are essentially different:
- In the case of the server it should be a lower value to avoid clients clogging up connection slots
- In the case of the client it should be a high value to accomedate slow responses from the server, for example for slow queries or when the lock is contended
Split the options into -rpcservertimeout
and -rpcclienttimeout
with
respective defaults of 30 and 900.
Should fix, or make it possible to fix timeout issues in #6655.