rpc server gives empty response after staying idle for few hours

+2 votes
I have hosted blockchain on CentOs server. It gives rpc json responses too and works perfectly fine. BUT AFTER FEW HOURS the rpc server gives empty json response with the chain still running. To get json response i have to kill the multichain on the port and start again by multichaind command and then i start getting response. Please help.
I dont want the blockchain to give empty responses even after few HOURS.
asked Nov 3, 2017 by tahadhailey

1 Answer

0 votes

Are you sure the MultiChain node is still running, i.e. do you see it in the ps -x process list?

answered Nov 3, 2017 by MultiChain
Yes. when i run the command - multichaind chain1 -daemon its gives this message "MultiChain 1.0.1 Daemon (protocol 10009)

MultiChain server starting
IO error: lock /root/.multichain/chain1/permissions.db/LOCK: Resource temporarily unavailable

ERROR: Couldn't initialize permission database for blockchain chain1. Probably multichaind for this blockchain is already running. Exiting...
[root@srv chain1]# multichain-cli chain1

MultiChain 1.0.1 RPC client


Interactive mode
"
i did run this command to check : ps aux | grep multichaind
Then i have to kill the chain and restart again.
OK, how are you sending the API requests? Via multichain-cli or some other library or method? And if you're not using multichain-cli, when you see the empty JSON responses, does multichain-cli still work to send API requests, or does it not?
i am sending API request via cURL in PHP. and after few hours when the curl stops working i check the cli and its gives no response.
 when i get empty response the multichain-cli works but also gives empty response.
Thanks. Please post a transcript of the multichain-cli session where you're sending a request and getting an empty response.
...