Hi Graham, We are not using other threads in the app. My best guess at this point is a stale .pyc file because (a) it persisted across servers, and (b) went away when the .py file mod time was updated.
I'll keep my eye out for it. Thanks for the explanation. Jason On Tue, Nov 11, 2014 at 5:23 PM, Graham Dumpleton < [email protected]> wrote: > > On 12/11/2014, at 8:32 AM, Jason Garber <[email protected]> wrote: > > > Hello, > > > > (RHEL 6, python33-mod_wsgi-4.3.0-1.ius.el6.x86_64, Python 3.3.6) > > > > For the last months(?) I've been getting these messages in my main > apache error log every 2 seconds. > > > > It's worth noting that *every* virtual host has it's logs directed > elsewhere and we haven't seen it there. The message exists 8 places on the > server in the source code. I edited all of the source code and put a > number in the message (e.g. "App1, App2"). I saved my edits, restarted > apache and ... the message stopped. I reverted my edits, restarted apache > and ... the message never came back. > > > > > > [root@tech apache]# tail -f error.log > > [Tue Nov 11 15:17:48 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb2ad557d0> ignored > > [Tue Nov 11 15:17:50 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb2ad4d280> ignored > > [Tue Nov 11 15:17:52 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb24cd0820> ignored > > [Tue Nov 11 15:17:54 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb20eea500> ignored > > [Tue Nov 11 15:17:56 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb20bc8140> ignored > > [Tue Nov 11 15:17:58 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb2116a410> ignored > > [Tue Nov 11 15:18:00 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb20bea140> ignored > > [Tue Nov 11 15:18:02 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb26d17b90> ignored > > [Tue Nov 11 15:18:04 2014] [error] Exception RuntimeError: > RuntimeError('App has not been opened with App.Open()',) in <generator > object Request at 0x7feb2acd96e0> ignored > > From memory, the fact it says 'ignored' at the end usually indicates that > this error is being logged direct to stderr in Python C internals when an > exception is raised during the destruction of an object, where the object > being destroyed was being destroyed within the context of code which was > already handling an exception. Or something like that. > > Python can't raise the inner exception because it is already handling the > outer. That it is sent direct to stderr at C level is why it bypasses the > sys.stderr at Python level which is attached to the VirtualHost. > > > This is an obvious concern when you don't make an actual change to a > file (verified with git) and a behavior is different. > > > > Possibly what in mod_wsgi would be called every 2 seconds? > > Nothing explicitly tied to 2 seconds. > > Even the timers that I do have where the duration is 1 second, or affected > by the timeout options to WSGIDaemonProcess, they operate at the C code > level and shouldn't be calling back into Python code. > > > Note: the behavior persisted across a server move. rsync was used to do > the move. I wonder if a .pyc file was stale or something, but still > interested in the 2 second thing. > > Maybe a stale .pyc file. > > Does your application itself create any background threads for any purpose? > > Graham > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
