"Too many tasks queued" possible bug?

293 views
Skip to first unread message

John

unread,
Sep 15, 2014, 7:13:41 PM9/15/14
to tas...@googlegroups.com
Hi,

I've been using Tasker for some years, and it's awesome - but occasionally I get Too many tasks queued errors.  I've got the Maximum Tasks Queued setting at 21.

The problem happened to me this morning, and I spent a while looking through the runlog (in a text editor - I'm eternally curious why Tasker is SOO slow at displaying it's own runlog - in the file system it was only 256k, though had been running, I guess, for weeks, so maybe it was bigger in memory. Anyway).

So I had multiple tasks running, and subsequent ones got "colon numbers" appended to their task ids, eg ID81, ID83:2, ID85:3.
(I had thought that the "colon number" business might be reserved for extra instances of the SAME task, but I guess I was wrong.)  

The strange thing was that even though tasks were exiting, the colon numbers were incrementing regardless, and not being reused.

The reason for this might be that I have one long running task, which basically downloads a small image every 5 seconds when wifi's connected, because otherwise my wifi link seems to get unresponsive to external requests (eg a Wifi keyboard).
That task got ":2" after it, and keeps running, and the others all increment it seems, up to :53.  
Is this normal/intended?  I really don't think there should be more than 5-10 tasks running at once ever in my set up - I'm wondering if the task counting is working properly?

Thanks,
John
runlog.txt

Rich D

unread,
Sep 15, 2014, 8:35:11 PM9/15/14
to Tasker Google Groups Post

> So I had multiple tasks running, and subsequent ones got "colon numbers" appended to their task ids, eg ID81, ID83:2, ID85:3.
> (I had thought that the "colon number" business might be reserved for extra instances of the SAME task, but I guess I was wrong.)  

According to the user guide you are correct..

ID Column

Shows Tasker's internal ID for the thing which the entry refers to. This is most useful for actions e.g. 2.4 refers to the fourth action in the task with ID 2.

Some task or action ID entries may also have a number after a colon; since multiple copies of a particular task can run at the same time, each task also receives a unique execution ID to distinguish it from others with the same data ID. The execution ID is shown with a colon e.g. a task with ID2:3 is the task with data ID 2 and execution ID 3.

Usually, the execution service will start up, run a task and then stop, so most tasks have execution ID 1. The Run Log doesn't show the execution ID in that case

Looking at the log it definitely looks like something is wrong with the execution id  numbers... 

It will probably help Pent  if you list your device details. Tasker, android version / custom rom / rooted /

And any recent updates..

Message has been deleted

John

unread,
Sep 15, 2014, 9:17:36 PM9/15/14
to tas...@googlegroups.com
Thanks for the comments - yes, I did recheck the user guide before making my comment about the colon, number, syntax - but I didn't think it was entirely clear if I was correct - and it doesn't matter either way I guess.

I'm happy to provide whatever Pent needs (though I'm unsure quite how easily reproducible the problem is, but I might see that Too Many Tasks message once a week perhaps).

The phone is an HTC One M7, running android 4.2, not rooted, unmodified HTC ROM.  Nova Launcher. Happy to provide my Tasker code etc, and try to take system debug logs if I can reproduce it.

Rich D

unread,
Sep 16, 2014, 8:35:29 PM9/16/14
to Tasker Google Groups Post


> The phone is an HTC One M7, running android 4.2, not rooted, unmodified HTC ROM.  Nova Launcher.

What is your tasker version?

After some thought and a little research i believe we are misreading the user guide..

Some task or action ID entries may also have a number after a colon; since multiple copies of a particular task can run at the same time, each task also receives a unique execution ID to distinguish it from others with the same data ID.

I believe Pent is just saying why there is a need for the execution ID's.  Not that they are only assigned to multiple iterations of the same task.

if I recall correctly all tasks receive a execution ID  but the Id is only shown when there is more then one of any task running.  

I have never had a task with very long wait in it so I never saw the execution ID's get very high, however after some testing i get the exact same results as you with a long wait. It would seem that the execution ID numbers only get reset when the task service is stopped and restarted IE -  after all tasks have stopped- . This is what your run log shows as well as what my testing confirmed.

Your log indicates that you either rebooted or tasker stopped and started again at 7.26.45    was this the 'too many tasks running' error?

Rich D

unread,
Sep 16, 2014, 9:53:18 PM9/16/14
to Tasker Google Groups Post

> Your log indicates that you either rebooted or tasker stopped and started again at 7.26.45    was this the 'too many tasks running' error?

After looking at it again,  at 7.26.45 you had a 'monitor start' which basically refired 5( i think)  profiles and this in turn started a bunch of tasks, some of them tried to start twice and were rejected. It also started several system tasks that were most likely to restore settings from your profiles going inactive on the monitor start as well.  I am not sure why activating 5 profiles would start so many tasks but this is where your max queued error occurred. 

Do you think you might have exited the tasker UI at 7.26.45?

There was recently a problem with the monitor starting when exiting the tasker UI and has been fixed in the latest beta. So perhaps the next release will fix this issue for you.. 

John

unread,
Sep 16, 2014, 10:07:58 PM9/16/14
to tas...@googlegroups.com

> What is your tasker version?

 4.4u3m

> After some thought and a little research i believe we are misreading the user guide..

Yep, that's why I said that I didn't think it was entirely clear - but that I didn't think it mattered either way as the problem exists regardless.

> I have never had a task with very long wait in it so I never saw the execution ID's get very high, however after some testing i get the exact same results as you with a long wait. It would seem that the execution ID numbers only get reset when the task service is stopped and restarted IE -  after all tasks have stopped- . This is what your run log shows as well as what my testing confirmed.

> Your log indicates that you either rebooted or tasker stopped and started again at 7.26.45    was this the 'too many tasks running' error?

 Thanks very much for your testing.  I didn't reboot or restart tasker manually - but yes, I would have gone into the tasker UI soon after seeing the too many tasks error.

I don't see how the fix in the next beta you mentioned will resolve my problem - because I didn't go into the UI until AFTER the (seemingly spurious) 'too many tasks queued' error occurred.

It still seems to me that maybe a long running task is causing the task-queued counting to count inaccurately for one reason or another - creating errors that shouldn't exist - but hey, I clearly know nothing about the implementation of tasker so I'm obviously just guessing here!

Regardless, thanks very much for your help!

Scott Almond

unread,
Sep 17, 2014, 6:10:19 AM9/17/14
to tas...@googlegroups.com
There are 49 different task IDs in your log. If only half of your tasks happen to be queued (And some of them run multiple times like ID 90 (triggering many times repeatedly)) then you are over your task queue limit of 21 without breaking a sweat. Try increasing it. I run mine at the max 100 limit and never have any problems. so long as you haven't got a task loop that keeps running the same task, you shouldn't have any problems.


Regards
Scott

Rich D

unread,
Sep 17, 2014, 6:49:54 AM9/17/14
to Tasker Google Groups Post

>  Thanks very much for your testing.  I didn't reboot or restart tasker manually - but yes, I would have gone into the tasker UI soon after seeing the too many tasks error.
>

Scott is correct in that increasing the number of queued tasks will stop that particular error. However you clearly have something killing tasker at t 7.26.45 , and when the monitor starts again there seems to be odd behavior, such as tasks being started and then trying to started again without the profile toggling and you have tasker trying to restore: settings as well. This is where you are getting too many tasks running. I do not think you can hold tasker responsible for a bit of odd behavior after it has been force closed. 

The key would be to find out what is closing tasker.

Do you have 'run in forground' checked in tasker prefrences?

Do you have any type of 'task killers' installed?

John

unread,
Sep 17, 2014, 11:54:15 AM9/17/14
to tas...@googlegroups.com
Scott - thanks for the suggestion - yes, increasing that limit is possible - but I seem to recall the manual recommends keeping it small - in part to detect problems more easily.  For the record, ID90 is not triggered many times repeatedly, it's just got a loop in it and that runs every 5 seconds.

Rich - you may well be right.  I've done a little more analysis of what tasks are running at any given time (see attached - though note that I removed the runlog items before 6.50 as they were incomplete) - and I think you're right that I do go over the 21 limit after the monitor restarts.  I don't have any task killers installed, but nor am I running tasker in the foreground - to avoid having its notification icon in the status bar.

It does indeed seem possible that Tasker was killed by Android around 7.26.45, and when it restarted, things went a little pear-shaped, and the number of active tasks went from less than 5, as it had been, up to 25.  Maybe that's perfectly reasonable - I don't know.

But it's curious.  Having just gone grepping through a backup of my profiles/tasks, the Portrait task is only called from one profile, the Portrait Apps profile.  It works that when certain apps are running, I want to lock the display portrait mode, ie disable auto-rotate.
This seems to be working fine before 7.26.45, exactly as I'd expect - but from that point - the Portrait task gets started (and then rejected) multiple times in quick succession, without the Portrait Apps profile being active or mentioned at all.

Any ideas why that might be?

Again, thanks all for your help.
runlog_analysis.txt

Rich D

unread,
Sep 19, 2014, 5:56:13 AM9/19/14
to tas...@googlegroups.com

but nor am I running tasker in the foreground - to avoid having its notification icon in the status bar.

I believe you can set the tasker icon to a blank/invisible icon in the tasker preferences.


> But it's curious.  Having just gone grepping through a backup of my profiles/tasks, the Portrait task is only called from one profile, the Portrait Apps profile.  It works that when certain apps are running, I want to lock the display portrait mode, ie disable auto-rotate.
> This seems to be working fine before 7.26.45, exactly as I'd expect - but from that point - the Portrait task gets started (and then rejected) multiple times in quick succession, without the Portrait Apps profile being active or mentioned at all.
>
> Any ideas why that might be?

Nah,  i would assume it is just flakey behavior from being force stopped. 

>
> Again, thanks all for your help.
>

> --
> You received this message because you are subscribed to the Google Groups "Tasker" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
> Visit this group at http://groups.google.com/group/tasker.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages