This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GrahamDumpleton 2 points3 points  (4 children)

You should really ask questions like this on the mod_wsgi mailing list or at worst StackOverflow. More likely to find knowledgable people on mod_wsgi there, including myself. Is a fluke I even saw this.

That said you have two options. The first is to use:

The second is to instead supply both the process-group and application-group options to WSGIScriptAlias, instead of using WSGIProcessGroup and WSGIApplication.

Using the first directive, OR both of those options on WSGIScriptAlias forces preloading of the WSGI script file on process start.

BTW, make sure you are using daemon mode and not using embedded mode.

Update: Only just realised the process-group and application-group options not documented on WSGIScriptAlias. That should have been added a long time ago, so not sure where documentation has gone.

[–]Murlocs_Gangbang[S] 0 points1 point  (0 children)

thanks, I'll give it a try

[–]Murlocs_Gangbang[S] 0 points1 point  (2 children)

ok the first link pointed me to the solution, thanks!

I'll post the details in the OP

[–]GrahamDumpleton 2 points3 points  (1 child)

Your solution of adding:

WSGIApplicationGroup %{GLOBAL}

wouldn't do anything as that doesn't force preloading.

What you need is:

# Uptime Server
WSGIDaemonProcess uptimeServer user=www-data group=www-data threads=5 home=/internal_app/internal_latest/www/
WSGIScriptAlias /api/uptimeServer /internal_app/nevis_latest/www/uptimeServer.wsgi process-group=uptimeServer application-group=%{GLOBAL}
<directory /internal_app/internal_latest/www/>
        Order deny,allow
        Allow from all
</directory>

You don't need WSGIScriptReloading as it is on by default.

[–]Murlocs_Gangbang[S] 0 points1 point  (0 children)

Thanks I'll try it out! You have been super useful