<p>After writing the question, I realized that maybe it was my instance of Cardano Wallet that was the problem. I checked the logs and it looks like the problem is two-fold: 1) I only allocated 1G of memory for the Cardano Wallet Docker container and it was being killed by the OOM killer. 2) I didn't have the wallet db mapped to a persistent volume, so whenever the container was restarted, I would lose my wallet.</p>
<p>So it doesn't appear that this is expected behavior. Host the Cardano Wallet API correctly and you shouldn't have this issue.</p>

CC BY-SA 4.0
2022-03-30T15:21:06.233Z
2022-03-30T15:21:06.233Z
RJ Regenold
<p>I have an instance of Cardano Wallet running and pointing at testnet. I create/restore a wallet like this:</p>
<pre><code>curl -v -H &quot;Content-Type: application/json&quot; -d '{&quot;name&quot;:&quot;My Wallet&quot;,&quot;mnemonic_sentence&quot;:[&quot;...&quot;],&quot;passphrase&quot;:&quot;...&quot;}' https://myserver.dev/cardano-wallet/v2/wallets
</code></pre>
<p>and get a successful response back, which includes a valid <code>walletId</code>.</p>
<p>For a few minutes, I can successfully query the API using this <code>walletId</code>. If I hit the <code>/wallets/{walletId}/addresses</code> endpoint, I get back a list of 20 unused addresses, as expected. However, after a short time (I haven't found the exact time but it seems to be around 5 minutes) I start to get a 404 with a response body similar to:</p>
<pre><code>{&quot;code&quot;:&quot;no_such_wallet&quot;,&quot;message&quot;:&quot;I couldn't find a wallet with the given id: ...&quot;}
</code></pre>
<p>Is this expected behavior? Is there something else I need to do to ensure the wallet can be found when I need to &quot;create&quot; addresses for it? I know I could always just &quot;restore&quot; it before executing an operation against the wallet, but this seems like it would add a lot of extra potentially unnecessary requests.</p>

<wallet><testnet>
Why does my testnet wallet "disappear"?
# Why does my testnet wallet "disappear"?

(Asked by: username_0 on 2022-03-30)

I have an instance of Cardano Wallet running and pointing at testnet. I create/restore a wallet like this:
curl -v -H "Content-Type: application/json" -d '{"name":"My Wallet","mnemonic_sentence":["..."],"passphrase":"..."}' https://myserver.dev/cardano-wallet/v2/wallets

and get a successful response back, which includes a valid walletId.
For a few minutes, I can successfully query the API using this walletId. If I hit the /wallets/{walletId}/addresses endpoint, I get back a list of 20 unused addresses, as expected. However, after a short time (I haven't found the exact time but it seems to be around 5 minutes) I start to get a 404 with a response body similar to:
{"code":"no_such_wallet","message":"I couldn't find a wallet with the given id: ..."}

Is this expected behavior? Is there something else I need to do to ensure the wallet can be found when I need to "create" addresses for it? I know I could always just "restore" it before executing an operation against the wallet, but this seems like it would add a lot of extra potentially unnecessary requests.

**Tags:** wallet, testnet

---

## 1 answers

### Answer by username_0 on 2022-03-30. Score: 0 | Accepted answer

After writing the question, I realized that maybe it was my instance of Cardano Wallet that was the problem. I checked the logs and it looks like the problem is two-fold: 1) I only allocated 1G of memory for the Cardano Wallet Docker container and it was being killed by the OOM killer. 2) I didn't have the wallet db mapped to a persistent volume, so whenever the container was restarted, I would lose my wallet.

So it doesn't appear that this is expected behavior. Host the Cardano Wallet API correctly and you shouldn't have this issue.


---

