OdyseeTeam / odysee-api

API server for Odysee
https://odysee.com
MIT License
228 stars 49 forks source link

increase timeout on txo spend / txo list #301

Closed tzarebczan closed 3 years ago

tzarebczan commented 3 years ago

We need to increase http timeouts for JSON-RPC methods txo_spend, txo_list and transaction_list as some of them can take 5+ minutes to run.

This can be done by creating a new http client for each new query.Query to be sent.

The SDK team will look to make methods more performant.

tzarebczan commented 3 years ago

Can we have this setp for txo spend? A VIP creator recently ran into this problem. The txo spend took 2+ hours due to a huge history.

tzarebczan commented 3 years ago

Other creators have run into this. WhenI did some testing, it can take hours to run for really large wallets.

bigOconstant commented 3 years ago

Pull request for this change.

https://github.com/lbryio/lbrytv/pull/325

anbsky commented 3 years ago

Done, thank you @camccar

anbsky commented 3 years ago

sorry @camccar, it slipped my attention that we were fixing the wrong timeout, http.Client.Transport.ResponseHeaderTimeout was the one to fix. I also added a test for it, in case you are curious.

bigOconstant commented 3 years ago

sorry @camccar, it slipped my attention that we were fixing the wrong timeout, http.Client.Transport.ResponseHeaderTimeout was the one to fix. I also added a test for it, in case you are curious.

TestCaller_timeouts, That is a really cool unit test .