closeio / closeio/tasktiger

Tasks stuck in active state for days

Open
#113 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
95
Avg merge
4d 21h
Merged PRs (30d)
1

Description

I've noticed some tasks are getting stuck in state active.

>>> count, tasks = Task.tasks_from_queue(tiger, queue + '.' + subqueue, 'active')
>>> count
1
>>> tasks
[<Task <function archive_data_for_user_and_month at 0x7fb18d5c8598>>]
>>> tasks[0]._data.get('unique')
True
>>> tasks[0]._data.get('time_last_queued')
1532891849.573912
>>> tasks[0]._ts
datetime.datetime(2018, 7, 30, 2, 37, 2, 150757)
>>> datetime.utcnow()
datetime.datetime(2018, 8, 2, 7, 55, 27, 503967)

Any idea as to a cause, and should I periodically look for and retry these tasks or should this be fixed inside tasktiger?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting Task.tasks_from_queue and the task state and timestamp fields shown in the report. Reproduce a task that remains active beyond its execution time and trace the queue/worker handling to identify the cause. Done means the cause is explained, stuck tasks are handled correctly, and a regression test covers the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.