for a few days now (I don't recall exactly when it started), my scheduled tasks have been consistently getting killed after a runtime of roughly an hour. Previously they ran fine for hours or days on end, only occasionally stopping due to restarts on the server side (Which are normal, as far as I'm informed).
The way the script is set up it very briefly interacts with some external websites (reddit, google), then waits for about five minutes to do it again. But now it sometimes, seemingly at random, stops right after these waiting periods and before anything else happens. This is what the log says:
.... INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: oauth.reddit.com INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (5): oauth.reddit.com INFO:root:Accessed Reddit at: 2015-10-22 12:58:53 /bin/bash: line 1: 12671 Killed python /bin/run_scheduled_task.py 'python2.6 calendarbot.py' 2015-10-22 13:03:05 -- Completed task, took 5761.00 seconds, return code was 137.
I have another logging.info() call right after time.sleep(300), but it doesn't get there. Also, the "took 5761.00 seconds" seems to come from somewhere else, because this script only uses about 3 seconds of processor time per hour.
I'm at a loss here, could this be somehow caused by PythonAnywhere, or is it more likely that there's a bug in my script?