On 18/06/2013, at 2:44 AM, Josh Nathanson <[email protected]> wrote:
> I think the table creation is kind of a red herring.
>
> To try and test what was going on, I commented out all the code in the main
> function of the python application, and just put a print statement "in main
> function."
>
> When I added application-group= ${GLOBAL}, it printed the statement 8 times
> on startup, twice for each process.
> When I removed application-group=${GLOBAL}, it printed the statement 4 times
> on startup, once for each process.
> In both cases the application preloaded, contrary to your statement that
> adding application-group was required for preloading.
>
> Is this what you would expect to see?
Is it a typo that you keep saying ${GLOBAL} instead of %{GLOBAL}?
In your print statements, do:
import mod_wsgi
print mod_wsgi.process_group
print mod_wsgi.application_group
to confirm what they are being loaded into.
Do note that if there is an error on preloading, the WSGI script will be deemed
to have not loaded. The first request will then try and reload it, although if
that errors again and keeps failing, it will subsequently try and reload it on
every request.
Put a print statement as the very last line in the WSGI script file to see if
that runs and check all Apache error log files and not just that VirtualHost.
In some odd cases for strange Apache error log setup, details of errors on
loading the WSGI script haven't been logged properly. Having that print
statement will show if it does get to the end.
Also make sure you have LogLevel at info so mod_wsgi logs about when it is
loading stuff. Go find those messages and post them so can see. They will show
process/application group names and process IDs. Thus can see better what is
happening.
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/groups/opt_out.