I have dug further, and it is definitely a cron issue. I have 3 cron tasks firing every minute, and they always completed in under 1 second. But every so often, the process lauched by web2py would seem to hang - it never executed my code (first line was logging, not executed for that process). These processes never exit.
lsof shows the normal cacaphony of open files, lots of stuff under python2.7, a few shared libs & pipes, cron.master, and a deleted file in / tmp. <http://tmp.cd> Any ideas on how to track this down? On Tue, Jul 5, 2011 at 12:47 PM, John Duddy <jdu...@gmail.com> wrote: > I am seeing lots of processes (20 or so) backing up, yet as far as I can > tell, they are not doing anything. I'll add some tracing to see if they are > actually processing, but slowly. > > > On Tue, Jul 5, 2011 at 12:32 PM, Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >> Are you starting a lot of cron tasks that do not terminate before the >> next one starts? >> I suggest you use a background process and do not use cron. To my >> knowledge there is no bug but cron become unpredictable if jobs take >> too long. >> >> >> Massimo >> >> >> On Jul 5, 10:34 am, John Duddy <jdu...@gmail.com> wrote: >> > I'm getting the following stack trace in my console after leaving my >> > app running overnight. We use cron for several tasks. >> > >> > I saw the below thread, which indicated that the issue has been >> > resolved: >> > >> > http://groups.google.com/group/web2py/browse_thread/thread/e788b0783e. >> .. >> > >> > Has there been a regression? >> > >> > Here's the stack trace. Thanks! >> > >> > Traceback (most recent call last): >> > File "/usr/local/lib/python2.7/threading.py", line 552, in >> > __bootstrap_inner >> > self.run() >> > File "/root/web2py/gluon/newcron.py", line 63, in run >> > s.run() >> > File "/usr/local/lib/python2.7/sched.py", line 117, in run >> > File "/root/web2py/gluon/newcron.py", line 55, in launch >> > crondance(self.path, 'hard', startup = False) >> > File "/root/web2py/gluon/newcron.py", line 234, in crondance >> > cronmaster = token.acquire(startup=startup) >> > File "/root/web2py/gluon/newcron.py", line 101, in acquire >> > self.master = open(self.path,'rb+') >> > IOError: [Errno 24] Too many open files: '/root/web2py/applications/ >> > admin/cron/cron.master' >> > > > > -- > John Duddy > jdu...@gmail.com > -- John Duddy jdu...@gmail.com