After moving to reDash 1.0.1 from 0.12 we had strange bug

[2017-04-18 11:14:07,771: ERROR/MainProcess] Task redash.tasks.refresh_queries[e715e6e5-e145-4ec7-bc3f-6bd975e0ae73] raised unexpected: OverflowError(‘Python int too large to convert to C long’,)
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/celery/app/trace.py”, line 240, in trace_task
R = retval = fun(*args, **kwargs)
File “/opt/redash/redash.1.0.1.b2833/redash/worker.py”, line 68, in call
return TaskBase.call(self, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/celery/app/trace.py”, line 438, in protected_call
return self.run(*args, kwargs)
File “/opt/redash/redash.1.0.1.b2833/redash/tasks/queries.py”, line 267, in refresh_queries
for query in models.Query.outdated_queries():
File “/opt/redash/redash.1.0.1.b2833/redash/models.py”, line 841, in outdated_queries
if should_schedule_next(retrieved_at, now, query.schedule, query.schedule_failures):
File “/opt/redash/redash.1.0.1.b2833/redash/models.py”, line 703, in should_schedule_next
next_iteration += datetime.timedelta(minutes=2
failures)
OverflowError: Python int too large to convert to C long

it start work after small change in models.py from

#next_iteration += datetime.timedelta(minutes=2failures)
next_iteration += datetime.timedelta(minutes=2
1)

I think some time “failures” can be very BIG number((((

1 Like

If I’m not mistaken, it needs to fail > 63 times to get this error. But the scheduler will schedule it for so far in the future before that that it won’t get to it… no?

Can you please check the values on your failures column?

[2017-04-18 12:59:33,943: WARNING/Worker-2] (‘failures:’, 269)
[2017-04-18 12:59:33,943: WARNING/Worker-2] (‘failures:’, 0)
[2017-04-18 12:59:33,943: WARNING/Worker-2] (‘failures:’, 0)
[2017-04-18 12:59:33,944: WARNING/Worker-2] (‘failures:’, 192)
[2017-04-18 12:59:33,944: WARNING/Worker-2] (‘failures:’, 247)
[2017-04-18 12:59:33,944: WARNING/Worker-2] (‘failures:’, 218)
[2017-04-18 12:59:33,944: WARNING/Worker-2] (‘failures:’, 0)
[2017-04-18 12:59:33,944: WARNING/Worker-2] (‘failures:’, 0)
[2017-04-18 12:59:33,945: WARNING/Worker-2] (‘failures:’, 0)
[2017-04-18 12:59:33,945: WARNING/Worker-2] (‘failures:’, 207)
[2017-04-18 12:59:33,945: WARNING/Worker-2] (‘failures:’, 238)

Strange. Does your version have any modifications?

Encountered the same bug. Deployed on ECS. Mutating all values in the failures column to be equal to 1 solved this for me.