How to fix freezing of multichain?

+2 votes
Hi, I have single node multichain on my server. A lot of times, during tests multichain is freezing. The only way to repair this is restart docker with it. What can be a reason? The server has enough power to handle docker with multichain.
asked Sep 13, 2017 by anonymous
This should certainly not happen. Please tell us:

a) What version of MultiChain you are using
b) What type of tests you are running (e.g. which APIs, and how many tps)
c) If there is anything showing in debug.log around the time when it freezes
d) The memory and CPU usage of MultiChain when it freezes (use top on Linux)
1) version 1.0.1
2) I had those problems before, so I delete my docker and create a new one. I started Multichain, created 2 open assets, 2 new wallet addresses, each of them receive 2 permissions and I uses "getaddresses" and it goes freeze.
API I am using is https://github.com/SimplyUb/MultiChainJavaAPI I found this link on your website.
3) Log does not show any unusual event
4) Memory is not a problem, during operations CPU usage is peaking even to 90%

What is important, one of the tests was pushing 1 assets between 2 wallets. And repeat it 100 times per minute. Even after 5000 transactions, there wasn't any problem, the only thing that happened was increasing time of doing next 100 operations. Probably problem occurs sometimes during issue command or retrieving some data for multichain.

1 Answer

–1 vote

Based on your description it sounds like you may be generating a large number of unspent transaction outputs that are never spent, and this is slowing down the "coin selection" procedure. You can confirm if this is the problem by calling getwalletinfo and looking at the utxocount field – please post its value here.

answered Sep 14, 2017 by MultiChain
Here is my getwalletinfo:
{
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "walletdbversion" : 2,
    "txcount" : 56,
    "utxocount" : 34,
    "keypoololdest" : 1505310673,
    "keypoolsize" : 2
}

But last freeze was on completely new multichain instance.
OK, so that is certainly not the problem. Your best bet is to start multichaind with -debug=mcapi, then wait until the problem recurs, stop the node, and send us the debug.log file from the blockchain directory to multichain dot debug at gmail dot com. We'll take a look and see if we can work out what's happening. You may of course also want to take a look first to see what API calls are coming in.
...