periodic tasks are not independent

Bug #2011587 reported by Maurice Escher
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description


coming from manila, where the manager inherits from PeriodicTasks

the tasks are started by a timer with

For the sake of making an understandable example let's simplify a bit:
I have
- task A and task B decorated by @periodic_task.periodic_task(spacing=10, run_immediately=True) and
- task C decorated by @periodic_task.periodic_task in my manager

My timer interval is 20 seconds, no initial delay.
Task B takes 35 seconds to complete.

Expected behaviour:
- Task A runs every 10 seconds.
- Unsure what to expect for Task B:
-- a) runs every 35 seconds
-- b) runs every 10 seconds, with multiple tasks of the same kind running in parallel
-- c) runs every 40 seconds (when the next timer tick comes around after completion)
- After 60 seconds initial delay task C runs every 60 seconds.

Observed behaviour:
Warning log line 'Function 'manila.service.Service.periodic_tasks' run outlasted interval by 15 sec' not telling me which task is the offender.

- Task A runs every 35 seconds.
- Task B runs every 35 seconds.
- Task C runs after initial delay sometimes after 35 seconds, sometimes after 60+15 seconds

Is is expected that my slow task B is affecting the interval at which my tasks A and C running?

When researching I stumbled upon, I think I'm not alone :)

Should I make different configuration/code in order to get my expected independent periodic tasks or is this behaviour a bug or rather a known limitation?


To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.