mynodebtc/mynode

curl hangs with high CPU usage fetching CoinDesk price

1ma opened this issue · 2 comments

1ma commented

Describe the bug
curl hangs fetching the current price from the CoinDesk API.

The command I'm seeing with htop seems to come from here

price_json_string = to_string(subprocess.check_output("torify curl --silent https://api.coindesk.com/v1/bpi/currentprice.json", shell=True))

For now I've simply disabled the Price Ticker from settings.

Expected behavior
curl is a short term process that shouldn't hang for 195 hours.

Screenshots
photo_2023-06-03_18-27-06

Desktop (please complete the following information):

  • Browser N/A
  • Version N/A

MyNode hardware (please complete the following information):

  • Device: Raspi4 8GB
  • Version 0.3.17

If you run the command manually, do you see the same error? I can add a max timeout to that command and slightly slow the poll rate.

1ma commented

Seems to work now, maybe it was a temporary error. Nevertheless, a timeout for the operation might be appropriate 🤔

photo_2023-06-05_11-46-53