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

Set infinite timeout for fetch_min_missing_block_cache method DB query #4314

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Jun 24, 2021

Motivation

{"error":{"initial_call":null,"reason":"** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)\n    (ecto_sql 3.5.3) lib/ecto/adapters/sql.ex:751: Ecto.Adapters.SQL.raise_sql_call_error/1\n    (ecto_sql 3.5.3) lib/ecto/adapters/sql.ex:684: Ecto.Adapters.SQL.execute/5\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:229: Ecto.Repo.Queryable.execute/4\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:149: Ecto.Repo.Queryable.one/3\n    (explorer 0.0.1) lib/explorer/chain.ex:2687: Explorer.Chain.fetch_min_missing_block_cache/0\n    (explorer 0.0.1) lib/explorer/chain/cache/min_missing_block.ex:28: Explorer.Chain.Cache.MinMissingBlockNumber.fetch_min_missing_block/0\n    (elixir 1.11.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2\n"},"logging.googleapis.com/sourceLocation":{"file":null,"line":0,"function":null},"message":"Task #PID<0.18593.19> started from Explorer.Chain.Cache.MinMissingBlockNumber terminating\n** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)\n    (ecto_sql 3.5.3) lib/ecto/adapters/sql.ex:751: Ecto.Adapters.SQL.raise_sql_call_error/1\n    (ecto_sql 3.5.3) lib/ecto/adapters/sql.ex:684: Ecto.Adapters.SQL.execute/5\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:229: Ecto.Repo.Queryable.execute/4\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3\n    (ecto 3.5.5) lib/ecto/repo/queryable.ex:149: Ecto.Repo.Queryable.one/3\n    (explorer 0.0.1) lib/explorer/chain.ex:2687: Explorer.Chain.fetch_min_missing_block_cache/0\n    (explorer 0.0.1) lib/explorer/chain/cache/min_missing_block.ex:28: Explorer.Chain.Cache.MinMissingBlockNumber.fetch_min_missing_block/0\n    (elixir 1.11.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2\nFunction: #Function<0.83273533/0 in Explorer.Chain.Cache.MinMissingBlockNumber.\"-fun.fetch_min_missing_block/0-\">\n    Args: []","severity":"ERROR","time":"2021-06-23T14:16:37.208Z"}

when query execution takes more than 6o seconds (default timeout)

Changelog

Set infinity timeout fetch_min_missing_block_cache method DB query

Checklist for your Pull Request (PR)

@vbaranov vbaranov changed the title Infinite timeout for fetch_min_missing_block_cache method DB query Set infinite timeout for fetch_min_missing_block_cache method DB query Jun 24, 2021
@vbaranov vbaranov force-pushed the vb-fetch_min_missing_block_cache-infinite-timeout branch from 8ca4661 to dfaf08e Compare June 24, 2021 19:16
@vbaranov vbaranov merged commit 2aca336 into master Jun 24, 2021
@vbaranov vbaranov deleted the vb-fetch_min_missing_block_cache-infinite-timeout branch June 24, 2021 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant