def small_test():
s = 's'*1256018
another_s = s
#print s
#print another_s
#print 'FINISHED PROCESS'
return dict(s = s, another_s = another_s, f = 'finished')DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: work to do 1405
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new scheduler_run record
INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task 1405 "small_test" portal/default.small_test
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new task allocated: portal/default.small_test
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task starting
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task started
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new task report: COMPLETED
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: result: {"s": "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss$
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: freeing workers that have not sent heartbeat
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: freeing workers that have not sent heartbeat
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: freeing workers that have not sent heartbeat
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:........recording heartbeat (RUNNING)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task timeout
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: recording task report in db (TIMEOUT)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: status TIMEOUT, stop_time 2016-02-29 11:56:52.393706, run_result {"s": "sssssssssssssssssssssssssss$
INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task completed (TIMEOUT)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:looping...
INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:nothing to do
from gluon.scheduler import Task
from gluon.scheduler import executor
t = Task(app='portal', function='small_test', timeout = 120)
import logging
logging.getLogger().setLevel(logging.DEBUG)
import multiprocessing
queue = multiprocessing.Queue(maxsize = 1)
out = multiprocessing.Queue()
t.task_id = 123
t.uuid = 'asdfasdf'
p = multiprocessing.Process(target=executor, args=(queue, t, out))
p.start()
p.join(timeout = 120)
p.is_alive()It happends not only while printing but also when returning values on a function as noted on the example :) so yes i do avoid printing but this also happens when returning more than 128kb of data (as noted by the bug reports) due to the fact (it seems) that the max data a process can comunicate to other via pipes is around that limit so that is the underlying reason.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/PunI6ffg9xk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Please do try :) I might be wrong :P and it could be something else; but I tried to narrow it down as much as I could.