web2py.scheduler.hpxyz#2791 - ERROR - we received a task that isn't there (15)

50 views
Skip to first unread message

Pierre

unread,
Feb 20, 2018, 12:48:51 PM2/20/18
to web2py-users
Hi,

i get the above error from time to time running 3 redis-scheduler processes while results look consistent. Is this a serious error or some kind of a fake alert ? does it mean something ?

Pierre

unread,
Feb 23, 2018, 2:03:53 PM2/23/18
to web2py-users
it's worst than i thought:

i increased tasks volume(100) with 3 up to 5 workers and now i get lot's of : we received a task that isn't there errors and a couple of dead tasks ( queued forever ). bad bad bad........
i'll check if python-rq can help with this and if it can't i am done with 'gesticulations'.......

http://python-rq.org/

Leonel Câmara

unread,
Feb 24, 2018, 4:38:04 PM2/24/18
to web2py-users
Are you using immediate=True in your queue_task, looking at the redis version of the scheduler's code, seems like, particularly when you have a lot of workers, it could cause redis to try to run the task before it is commited in the database. If that's the problem we should look into the code and try to fix it but you could as a workaround remove imediate=True.

Pierre

unread,
Feb 26, 2018, 9:11:56 AM2/26/18
to web2py-users
yes correct immediate=False and errors are gone. setting heartbeat=1 instead of default and errors are back. I would not say lot's of workers since i can hardly run more than 3 workers....5 workers == computer crash.............

i will learn how to walk on eggs, it can be useful.......

Leonel Câmara

unread,
Feb 26, 2018, 9:50:17 AM2/26/18
to web...@googlegroups.com
Can you try another thing for me.

In redis_scheduler.py in line 732:

if not rtn.errors:
     self.db.commit()  ## Add this line

Restart the scheduler, and check if the problem is solved?


Pierre

unread,
Feb 27, 2018, 7:57:26 AM2/27/18
to web2py-users
I did the change at line 732 and the error continues to show up (immediate=True). Besides there is another problem i forgot to mention earlier :
the scheduler_task and scheduler_run tables are not updated properly. what i do is run a python script using the requests and threading module to perform app stress tests. every time i run this script, it's supposed to queue 100 new tasks and delegate work to the workers. first time i run the script new tasks are added to the tables as they should but not the second,third....times. With the change you suggested script may return HTTP errors 500 which is something new


if you or someone else could tell me how to start a python-rq worker within web2py i'd like to give it a try, otherwise what would be the workaround if any?

https://groups.google.com/forum/#!msg/web2py/kAG2Y_tDoUE/ycJAdjj1hsgJ
https://groups.google.com/forum/#!msg/web2py/js0VAKK6Dlw/CJ46I-0wT0wJ

from Bruno Rocha's receipt:  this doesn't seem to work (sh file to start a rq worker):

cd /pathTo/web2py
sudo python web2py
.py -S myapp -M -R w2p-rqworker.py


Reply all
Reply to author
Forward
0 new messages