Forums

scheduled task killed, return code was 137.

The same script was killed in scheduled task. Sometimes it rans till the end sometimes it killed half way.

2016-09-21 04:08:11 -- Completed task, took 9606.00 seconds, return code was 137.

Do you know if your script takes up a lot of memory when it runs?

I am not sure. how it is measure? But sometimes it can run perfectly and sometimes not. Every time it is stop at different bash files. run manually has no such issues.

What does your script do/do you know if it is a cpu intensive script vs a io bound script vs a memory intensive script?

my script pull data and then analyse it. How you measure it is CPU intensive ? I/O bound may be but if not schedule task run fine. Memory intensive I do not think so. what is the limit set for free and paid account?

Ooh I just realized what's going on. For free users, your script may get killed if they have been running for longer than 2 hrs. The limit for paying users is 12 hrs. These limits are subject to change and are there to free up resources (eg: in case your script has gotten stuck etc).

for paid user, we can scheduled up to 2 tasks. the 12 hours is for one scheduled task or a total of 20 tasks?

For a typical paid user you can schedule up to 20 tasks and each task will be given 12hrs to run.

Take a look at our help page about long running tasks if you are looking to run anything for longer.

Great, this makes sense. I (a free user) just got a code 137 after 8942 seconds (or 2 hours 29 mins) of my script running. Is it still the case that the paid version gives you 12 hours of run time ? Or has it changed since 2016?

Great, this makes sense. I (a free user) just got a code 137 after 8942 seconds (or 2 hours 29 mins) of my script running. Is it still the case that the paid version gives you 12 hours of run time ? Or has it changed since 2016?

Free users are limited to an hour and paying users are limited to 6 hours.

Hello. What should I do if I need the console to work 24/7? Is the time counting independently of the computation, or is it similar to CPU seconds? If the latter, does the "time.sleep()" command affect the time?

@supervit Consoles are ephemeral by design. We have Always on tasks for long running jobs. See https://help.pythonanywhere.com/pages/AlwaysOnTasks/

@fjl I have an always-on task set up. But I still sometimes find my console is off. How can this be fixed? Or pythonanywhere not suitable for such tasks?

@supervit -- always-on tasks are not running in the consoles. Are you experiencing problems with the task or with the console?

@pafk I dont know. I have a persistent task set up and it works, but I still sometimes find that the console is turned off.

What do you mean by a persistent task? Where are you running it? From the Tasks page or in a console?

@glenn i mean what fjl was talking about. I am running it from the task page.

so if you have an always on task on the task page, it does not have anything to do with the consoles. consoles do get restarted, and anything running in the console will be stopped. For always on tasks, we do not restart those tasks, but if say your code errors and stops, we would restart that automatically for you.