Issue Details
- Number
- 27732
- Title
- Creating too many wallets exhausts file descriptor limit and leads to crash
- Description
- ### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
This behavior was first noted by @EthanHeilman here: https://github.com/bitcoin/bitcoin/issues/11368#issuecomment-751574945 but it was conflated with the RPC issue there while I now think this is a separate issue.
When a lot of wallets are created in quick succession, sqlite will exhaust all the available file descriptors and the node crashes the next time it tries to create file for unrelated reasons (blk, rev etc.).
### Expected behaviour
The node shouldn't crash.
### Steps to reproduce
```
for i in $(seq 1 100); do src/bitcoin-cli createwallet "fd-wallet$i"; done
```
### Relevant log output
https://0bin.net/paste/swIJVCaU#CuCCWv7cC4ZscxjCEiauqEhB1icPiMHkYo+D5dC8mSr
### How did you obtain Bitcoin Core
Compiled from source
### What version of Bitcoin Core are you using?
master
### Operating system and version
macOS
### Machine specifications
_No response_
- URL
-
https://github.com/bitcoin/bitcoin/issue/27732
- Closed by
-
Back to List