Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs datasource doesn't respect http.connection_timeout config field #687

Closed
tezosmiami opened this issue Apr 28, 2023 · 6 comments · Fixed by #690
Closed

ipfs datasource doesn't respect http.connection_timeout config field #687

tezosmiami opened this issue Apr 28, 2023 · 6 comments · Fixed by #690
Assignees
Labels
bug Something isn't working community Reported or suggested by our awesome users

Comments

@tezosmiami
Copy link

Steps to reproduce:
clone - https://github.com/tezosmiami/hicdex.git
run readme commands
What did you expect to happen:
for it to index
What actually happened:
it did index up to objkt #67865 - which appears to have lost metadata - not pinned - then dipdup jumps to the latest levels and keeps going from there without indexing - running all night. . .

Environment

on ubuntu 22.10 server

  • Python version:
  • 3.10.7
  • DipDup version or commit hash:
  • 6.5.5
  • Database engine version:
  • 14
  • Hasura version:
  • 2.23.0
  • Are you in docker?
  • yes
  • Can you reproduce this issue on master?
  • yes

logs.txt
config.txt
models.txt

@droserasprout
Copy link
Member

Update datasource config to limit retries. . .

datasources:
  metadata:
    ...
    http:
      retry_count: 3

. . .than catch and process exceptions in the handler. Should help. . . HTTP gateway defaults will be updated in #677.

@tezosmiami
Copy link
Author

no luck with changing retry count. . .

@droserasprout
Copy link
Member

droserasprout commented Apr 28, 2023

Oh, it's ipfs datasource to blame, not metadata. Try:

try:
    coro = ipfs.get('asdfasdfasdf')
    data = await asyncio.wait_for(coro, 60)
except asyncio.TimeoutError:
    data = None

Normally all datasources should respect http.connection_timeout setting, defaulting to 60 seconds. If they don't it's possibly a bug.

@tezosmiami
Copy link
Author

awesome - exactly it for this one - the metadata for that objkt is missing from all ipfs datasources - probably not pinned - was actually looking into async.wait_for() - this made it very clear - thanks again!

@droserasprout
Copy link
Member

Nice. Leaving open to check retries and timeouts later.

@droserasprout droserasprout changed the title indexing issue with broken metadata. . . ipfs datasource doesn't respect http.connection_timeout config field Apr 28, 2023
@droserasprout droserasprout self-assigned this Apr 28, 2023
@droserasprout droserasprout added bug Something isn't working community Reported or suggested by our awesome users labels Apr 28, 2023
@tezosmiami
Copy link
Author

tezosmiami commented Apr 29, 2023

same thing seems to be happening sometimes with http request to tzkt_mainnet - sometimes goes back to indexing after hicdex container reboot. . .

log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Reported or suggested by our awesome users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants