2009/1/2 William Dode <[email protected]>: > > On 01-01-2009, Graham Dumpleton wrote: >> >> Sorry for the delayed reply. >> >> Where is the package/module called 'host_cde' installed? >> >> If not on standard Python module search path and you have set sys.path >> explicitly to add parent directory, or used python-path option to >> WSGIDaemonProcess, clearly state which was used. > > It's set with python-path of the deamonprocess directive. > >> >> The logs show: >> >> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Adding >> '/home/web/xxx/pynclude' to path. >> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Adding >> '/home/web/xxx/xxx.flibuste.net/pynclude' to path. >> >> This suggests to me that using python-path option. These first entries >> though are for main interpreter instance, ie., %{GLOBAL}. >> >> Look down further and you will see: >> >> [Tue Dec 30 10:54:36 2008] [info] mod_wsgi (pid=369): Create >> interpreter 'xxx.flibuste.net|/cde/serv_cde.wsgi'. >> [Tue Dec 30 10:54:36 2008] [info] mod_wsgi (pid=369): Adding '' to path. >> >> Thus, when it later creates sub interpreter, the path seems to have >> been mangled in stored configuration and thus only empty path added >> and not the two directories above where your package/module possibly >> is. Thus can't find module. > > I see, but the question is why the python-path configuration is > corrupted (one time it's empty but another time it's > \x957Q\xb7`\xb51\b\xff\xff\xff...). > Nothing was changed in the configuration, the app was restarted because > of timeout inactivity. Indeed, if i restart apache it start again > without problem.
The bug with which memory pool was used, potentially meant that stuff like the value of the python-path option was stored in memory which had been released. When that memory would be reused would be a bit random and depend on history of how memory is used by the application. Anyway, best answer I have at the moment as to what the cause of the problem may be. Graham >> Graham >> >> 2008/12/30 William Dode <[email protected]>: >>> >>> On 22-12-2008, Graham Dumpleton wrote: >>>> >>>> 2008/12/23 William Dode <[email protected]>: >>>>> >>>>> >>>>> On 22-12-2008, William Dode wrote: >>>>> k >>>>>> >>>>>> Hi, >>>>>> >>>>>> I found something strange on an app wich run under deamon process >>>>>> >>>>>> [Mon Dec 22 06:45:27 2008] [info] mod_wsgi (pid=14608): Create >>>>>> interpreter 'xxx.flibuste.net|/cde/serv_cde.wsgi'. >>>>>> [Mon Dec 22 06:45:27 2008] [info] mod_wsgi (pid=14608): Adding >>>>>> '/home/web/xxx/pynclude' to path. >>>>>> [Mon Dec 22 06:45:27 2008] [info] mod_wsgi (pid=14608): Adding >>>>>> '/home/web/xxx/xxx.flibuste.net/pynclude' to path. >>>>>> [Mon Dec 22 06:45:27 2008] [info] [client 67.202.43.229] mod_wsgi >>>>>> (pid=14608, process='xxx.flibuste.net', >>>>>> application='xxx.flibuste.net|/cde/serv_cde.wsgi'): Loading WSGI script >>>>>> '/home/web/xxx/xxx.flibuste.net/www/cde/serv_cde.wsgi'. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Daemon process >>>>>> inactivity timer expired, stopping process 'xxx.flibuste.net'. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Shutdown >>>>>> requested 'xxx.flibuste.net'. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Stopping process >>>>>> 'xxx.flibuste.net'. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Destroy >>>>>> interpreter 'xxx.flibuste.net|/cde/serv_cde.wsgi'. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Cleanup >>>>>> interpreter ''. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=14608): Terminating >>>>>> Python. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=12221): Attach >>>>>> interpreter ''. >>>>>> [Mon Dec 22 07:04:06 2008] [info] mod_wsgi (pid=12221): Adding >>>>>> '\x957Q\xb7`\xb51\b\xff\xff\xff\xff\xb8\xb61\b\x02' to path. >>>>> >>>>> Also in apache error log : >>>>> [Mon Dec 22 07:04:06 2008] [alert] (2)No such file or directory: mod_wsgi >>>>> (pid=12221): Unable to change working directory to >>>>> '7Q\xb7\xb8\xb41\b\xff\xff\xff\xff\xa0\xbc1\b\x02'. >>>> >>>> May be a similar case of configuration corruption which has caused: >>>> >>>> http://code.google.com/p/modwsgi/issues/detail?id=78 >>>> >>>> The fix, if you can compile from source, is to change all references >>>> to 'temp_pool' to 'pool'. >>> >>> The problem came back today, so it was not related to my log rotation >>> mystake like i thought. But now i've my logs... I notice a difference >>> not usual : >>> >>> [Tue Dec 30 10:26:52 2008] [debug] mod_deflate.c(619): [client >>> 82.127.20.132] Zlib: Compressed 2045 to 609 : URL >>> /cde/serv_cde.wsgi/commande, r >>> eferer: http://xxx.flibuste.net/cde/commande >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Daemon process >>> inactivity timer expired, stopping process 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Shutdown requested >>> 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Stopping process >>> 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Destroy interpreter >>> 'xxx.flibuste.net|/cde/serv_cde.wsgi'. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Cleanup interpreter >>> ''. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=29518): Terminating Python. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Attach interpreter ''. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Adding >>> '/home/web/xxx/pynclude' to path. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Adding >>> '/home/web/xxx/xxx.flibuste.net/pynclude' to path. >>> [Tue Dec 30 10:36:52 2008] [debug] mod_wsgi.c(8449): mod_wsgi (pid=369): >>> Starting 1 threads in daemon process 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [debug] mod_wsgi.c(8455): mod_wsgi (pid=369): >>> Starting thread 1 in daemon process 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Enable monitor thread >>> in process 'xxx.flibuste.net'. >>> [Tue Dec 30 10:36:52 2008] [debug] mod_wsgi.c(8301): mod_wsgi (pid=369): >>> Deadlock timeout is 300. >>> [Tue Dec 30 10:36:52 2008] [debug] mod_wsgi.c(8304): mod_wsgi (pid=369): >>> Inactivity timeout is 600. >>> [Tue Dec 30 10:36:52 2008] [info] mod_wsgi (pid=369): Enable deadlock >>> thread in process 'xxx.flibuste.net'. >>> [Tue Dec 30 10:54:36 2008] [info] mod_wsgi (pid=369): Create interpreter >>> 'xxx.flibuste.net|/cde/serv_cde.wsgi'. >>> [Tue Dec 30 10:54:36 2008] [info] mod_wsgi (pid=369): Adding '' to path. >>> [Tue Dec 30 10:54:36 2008] [info] [client 195.101.14.207] mod_wsgi >>> (pid=369, process='xxx.flibuste.net', application='xxx.flibuste.net|/c >>> de/serv_cde.wsgi'): Loading WSGI script >>> '/home/web/xxx/xxx.flibuste.net/www/cde/serv_cde.wsgi'. >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] mod_wsgi >>> (pid=369): Target WSGI script '/home/web/xxx/xxx.flibuste.net/www/cde >>> /serv_cde.wsgi' cannot be loaded as Python module. >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] mod_wsgi >>> (pid=369): Exception occurred processing WSGI script '/home/web/xxx/espa >>> ce.flibuste.net/www/cde/serv_cde.wsgi'. >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] Traceback (most >>> recent call last): >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] File >>> "/home/web/xxx/xxx.flibuste.net/www/cde/serv_cde.wsgi", line 3, in <mod >>> ule> >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] import >>> host_cde >>> [Tue Dec 30 10:54:36 2008] [error] [client 195.101.14.207] ImportError: No >>> module named host_cde >>> >>> At 10:26, the request was ok (i could see that a commande was created in >>> my database) >>> Between 10:26 and 10:54 there was no activity >>> >>> At 10:54, we cannot see 'Deamon process inactivity timer expired...' >>> strange isn't it ? >>> >>> >>> What is very strange is that i've exactly the same app (since months) >>> under an other virtualhost and only one has this problem... On this >>> server 16 mod_wsgi apps run, no one has this problem. >>> >>> So, today i hacked the code like you said me, changing temp_pool to >>> pool. If you've no other idea we'll see like that. >>> >>> bye >>> >>> -- >>> William Dodé - http://flibuste.net >>> Informaticien Indépendant >>> >>> >>> > >>> >> > > > -- > William Dodé - http://flibuste.net > Informaticien Indépendant > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
