Hello! After upgrading from `1.2.7` to `1.3.2` Dag...
# dagster-feedback
a
Hello! After upgrading from
1.2.7
to
1.3.2
Dagit started to load very slowly and also failing 90& of the time with GraphQL error like this:
Copy code
Operation name: SingleSensorQuery

Message: (psycopg2.errors.QueryCanceled) canceling statement due to statement timeout

[SQL: SELECT runs.id, runs.run_body, runs.status, runs.create_timestamp, runs.update_timestamp, runs.start_time, runs.end_time 
FROM runs 
WHERE runs.run_id IN (SELECT run_tags.run_id 
FROM run_tags 
WHERE run_tags.key = %(key_1)s AND run_tags.value = %(value_1)s INTERSECT SELECT run_tags.run_id 
FROM run_tags 
WHERE run_tags.key = %(key_2)s AND run_tags.value = %(value_2)s) ORDER BY runs.id DESC 
 LIMIT %(param_1)s]
[parameters: {'key_1': 'dagster/sensor_name', 'value_1': 'mainnet_bsc_blockstream_sensor', 'key_2': '.dagster/repository', 'value_2': '__repository__@dagster-code-location', 'param_1': 1}]
(Background on this error at: <https://sqlalche.me/e/14/e3q8>)

Path: ["sensorOrError","sensorState","runs"]

Locations: [{"line":28,"column":9}]

Stack Trace:
  File "/usr/local/lib/python3.7/site-packages/graphql/execution/execute.py", line 521, in execute_field
    result = resolve_fn(source, info, **args)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/schema/instigation.py", line 487, in resolve_runs
    limit=limit,
  File "/usr/local/lib/python3.7/site-packages/dagster/_utils/__init__.py", line 647, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/dagster/_core/instance/__init__.py", line 1597, in get_run_records
    filters, limit, order_by, ascending, cursor, bucket_by
  File "/usr/local/lib/python3.7/site-packages/dagster/_core/storage/runs/sql_run_storage.py", line 510, in get_run_records
    rows = self.fetchall(query)
  File "/usr/local/lib/python3.7/site-packages/dagster/_core/storage/runs/sql_run_storage.py", line 110, in fetchall
    result_proxy = conn.execute(query)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1380, in execute
    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 335, in _execute_on_connection
    self, multiparams, params, execution_options
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1582, in _execute_clauseelement
    cache_hit=cache_hit,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1944, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2125, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1901, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)

The above exception was the direct cause of the following exception:

Message: psycopg2.errors.QueryCanceled: canceling statement due to statement timeout



Stack Trace:
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1901, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
it has become almost impossible to operate through the UI to turn on/off the sensors, check the runs history, etc.
@daniel sorry for bothering you 2nd day in a row 🙂 maybe you know what can I do with it? I doubled both cpu and memory resources for Dagit on k8s but it doesn't seem to help maybe I can somehow increase this 'statement timeout'?