<p>This is a <a href="https://github.com/bitcoin/bitcoin/issues/15291#issuecomment-459131886" rel="nofollow noreferrer">known bug</a> and has been fixed for 0.18 which will be released in the coming weeks.</p>

CC BY-SA 4.0
2019-03-05T09:34:44.083Z
Yes, thank you a lot. Already found that 
Soooo glad it is fixed :) I'm the happiest person today!
Lizzy Bug
CC BY-SA 4.0
2019-03-04T20:16:04.227Z
2019-03-04T20:16:04.227Z
Ava Chow
<p>Bitcoin RPC unloadwallet command does not close files opened by bitcoind process.
I want to generate addresses for multiple wallets (over 1000) and get 'Too many opened files error'.
Is there a way to close files, associated with unloaded wallet?</p>

<p>.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/.walletlock
.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/db.log
.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/database/log.0000000001</p>

CC BY-SA 4.0
2019-03-04T15:10:51.260Z
To begin with, why on earth do you want to do that?
Claris
CC BY-SA 4.0
2019-03-04T15:13:18.057Z
For my project. I generate wallets for customers
Lizzy Bug
CC BY-SA 4.0
2019-03-04T15:46:20.973Z
That’s generally not how people go about this. At the very least the software isn’t designed to handle tens or hundreds of wallets. Generally speaking if you’re handling customer money it’ll just end up all in one wallet.
Claris
CC BY-SA 4.0
2019-03-04T16:00:33.270Z
Thank you for comments. But why money would end up in one wallet? I have multiple folders under wallets directory. And Bitcoin RPC allows to create and switch between wallets
Lizzy Bug
CC BY-SA 4.0
2019-03-04T18:36:59.863Z
Why would you want them in separate wallets?
Claris
CC BY-SA 4.0
2019-03-04T19:07:11.360Z
To separate users funds safely
Lizzy Bug
<bitcoin-core><json-rpc>
Bitcoin RPC. How to close wallet files opened by bitcoin?
Lizzy Bug
# Bitcoin RPC. How to close wallet files opened by bitcoin?

(Asked by: username_0 on 2019-03-04)

Bitcoin RPC unloadwallet command does not close files opened by bitcoind process.
I want to generate addresses for multiple wallets (over 1000) and get 'Too many opened files error'.
Is there a way to close files, associated with unloaded wallet?

.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/.walletlock
.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/db.log
.bitcoin/testnet3/wallets/3f7b93e26b498be43235a9beda796d8d/database/log.0000000001

**Tags:** bitcoin-core, json-rpc

> **Comments:**
> **username_1**: To begin with, why on earth do you want to do that?  
> **username_0**: For my project. I generate wallets for customers  
> **username_1**: That’s generally not how people go about this. At the very least the software isn’t designed to handle tens or hundreds of wallets. Generally speaking if you’re handling customer money it’ll just end up all in one wallet.  
> **username_0**: Thank you for comments. But why money would end up in one wallet? I have multiple folders under wallets directory. And Bitcoin RPC allows to create and switch between wallets  
> **username_1**: Why would you want them in separate wallets?  
> **username_0**: To separate users funds safely  

---

## 1 answers

### Answer by username_2 on 2019-03-04. Score: 0 | Accepted answer

This is a [known bug](https://github.com/bitcoin/bitcoin/issues/15291#issuecomment-459131886) and has been fixed for 0.18 which will be released in the coming weeks.

> **Comments:**
> **username_0**: Yes, thank you a lot. Already found that  Soooo glad it is fixed :) I'm the happiest person today!  

---

