2008/8/22 Olive <[EMAIL PROTECTED]>:
>
> OK,
>
> I have added this to httpd.conf:
> WSGIPythonPath /data/search/modwsgi
>
> and this to my app:
> from loaddb import ipcindex
>
> The first 8 requests are slow (loadding the pickled object I guess).
> Subsequent ones are blazing fast !
>
> What's wrong with the first 8 ? is it because 8 processes are
> initiated by apache ?
Change:
WSGIImportScript /data/search/modwsgi/loaddb.py
process-group=%{GLOBAL} application-group=%{GLOBAL}
to:
WSGIImportScript /data/search/modwsgi/ipcsearch.wsgi
process-group=%{GLOBAL} application-group=%{GLOBAL}
You fell foul of warning about dual imports of Python code files
talked about in:
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
So, although you had used WSGIImportScript to preload code, because
you did it direct against a module which was intended to be loaded
using 'import', a separate copy was created, so you weren't actually
getting benefit of caching.
WSGIImportScript should generally only be used with WSGI script files,
or at least the file shouldn't do anything except import other Python
modules.
Graham
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---