Bitcoind throw an error:
Cannot create connection: non-selectable socket created (fd >= FD_SETSIZE ?)
Expected behavior
Should not display this error.
To reproduce Before start bitcoind, set fd limit to 10240
ulimit -n 10240
Then start bitcoind with -rpcworkqueue=10240 parameter. Start to send over 1024 requests to RPC on the same time.
bitcoind version is 0.17.0, OS is Linux.
Possiable Cause
I have check the code, if a socket is !IsSelectableSocket(), bitcoind then print this error.
Then I check IsSelectableSocket function in src/compat.h, I found IsSelectableSocket() may return ( fd < FD_SETSIZE) as return value if OS is not Linux. This is strange while I am using Linux.
I think the __linux__ macro is not defined on compiling, but I cant verify that. The binary file from official site.