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

OperationalError: canceling statement due to conflict with recovery #906

Closed
ukanga opened this issue Feb 9, 2017 · 0 comments
Closed

OperationalError: canceling statement due to conflict with recovery #906

ukanga opened this issue Feb 9, 2017 · 0 comments

Comments

@ukanga
Copy link
Member

ukanga commented Feb 9, 2017

Has been observed in different places, most likely during read operations with a read replica db

Exception in request: OperationalError: canceling statement due to conflict with recovery
DETAIL:  User query might have needed to see row versions that must be removed.
Traceback (most recent call last):
  File "/..../app-versioned/1486626094/onadata/apps/viewer/tasks.py", line 293, in create_sav_zip_export
    options
  File "/..../app-versioned/1486626094/onadata/libs/utils/export_tools.py", line 156, in generate_export
    options=options, columns_with_hxl=columns_with_hxl
  File "/..../app-versioned/1486626094/onadata/libs/utils/export_builder.py", line 861, in to_zipped_sav
    for d in data:
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/query.py", line 258, in __iter__
    self._fetch_all()
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/query.py", line 1074, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/query.py", line 158, in __iter__
    for row in compiler.results_iter():
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 802, in results_iter
    results = self.execute_sql(MULTI)
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
    cursor.execute(sql, params)
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
OperationalError: canceling statement due to conflict with recovery
DETAIL:  User query might have needed to see row versions that must be removed.

Aha! Link: https://ona.aha.io/features/PROD-631

@ukanga ukanga changed the title Export exception: OperationalError: canceling statement due to conflict with recovery OperationalError: canceling statement due to conflict with recovery Feb 9, 2017
@ukanga ukanga added API and removed Module: Exports labels Feb 9, 2017
@denniswambua denniswambua modified the milestones: Week 8, Week 10 Feb 13, 2017
@denniswambua denniswambua modified the milestones: Week 10, Week 12 Feb 27, 2017
@ukanga ukanga modified the milestone: Week 14 Apr 10, 2017
@ukanga ukanga added this to the Week 26 - 27 (2019) milestone Jul 3, 2019
@ukanga ukanga closed this as completed in c97e80e Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants