Perfect, thanks for the tip.  I wasn't involved in the install process
so I was, by and large, ignoring that section of the docs.  Shame on
me.  Those scripts are perfect for me to gain a better understanding
of how my config changes affect the runtime behavior of the server.

I appreciate the guidance.
-Jonathan

On Jan 19, 4:57 am, Graham Dumpleton <[email protected]>
wrote:
> Some frameworks don't like running multiple application instances in
> the same interpreter. Django is like this and so you can't force
> multiple instances to all run in the main interpreter.
>
> BTW, in:
>
> http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation
>
> there are various examples of small WSGI scripts you can use to
> validate whether running in embedded or daemon modes and whether in
> main interpreter or sub interpreter.
>
> Graham
>
> On 19 January 2012 19:43, Jonathan Thomas <[email protected]> 
> wrote:
>
>
>
>
>
>
>
> > Thanks, after a bit of cleanup of things I tried between question and
> > answer I have everything up and running now.
>
> > The application running in daemon mode is also using subprocess on
> > python 2.7.2 so I ran into the autoTLSkey mapping error (https://
> > groups.google.com/forum/#!msg/modwsgi/DW-SlIb07rE/FTE7A8WZ8msJ)
>
> > If I add the WSGIApplicationGroup %{GLOBAL} my problems go away and it
> > *seems* like my configuration is holding up and requests are being
> > served properly.  I have to admit though that I'm not 100% confident
> > that the system is behaving as intended due to my lack of familiarity
> > with both apache and mod_wsgi configuration options.
>
> > I updated the conf like below, are there any side-effects I need to
> > worry about?  Other than running all the /app processes in the main
> > interpreter instead of in sub-interpreters?
>
> >> WSGIDaemonProcess app user=admin processes=3 threads=1
>
> >> WSGIScriptAlias /app/ /var/www/wsgi-scripts/pastedeploy-app.wsgi
> >> process-group=app
> >  WSGIApplicationGroup %{GLOBAL}
>
> >> WSGIScriptAlias / /var/www/wsgi-scripts/pastedeploy.wsgi
>
> > -Jonathan
>
> > On Jan 18, 4:37 pm, Graham Dumpleton <[email protected]>
> > wrote:
> >> You can mix them.
>
> >> Interpretation of WSGIProcessGroup is not done in order with other
> >> directives, whichever is last wins.
>
> >> Since you are using mod_wsgi 3.x one way you can be more precise by doing:
>
> >> WSGIDaemonProcess app user=admin processes=3 threads=1
>
> >> WSGIScriptAlias /app/ /var/www/wsgi-scripts/pastedeploy-app.wsgi
> >> process-group=app
>
> >> WSGIScriptAlias / /var/www/wsgi-scripts/pastedeploy.wsgi
>
> >> The more long handed way is to use:
>
> >> WSGIDaemonProcess app user=admin processes=3 threads=1
>
> >> WSGIScriptAlias /app/ /var/www/wsgi-scripts/pastedeploy-app.wsgi
>
> >> WSGIScriptAlias / /var/www/wsgi-scripts/pastedeploy.wsgi
>
> >> <Directory /var/www/wsgi-scripts/>
> >> <Files paste deploy-app.wsgi>
> >> WSGIProcessGroup app
> >> </Files>
> >> </Directory>
>
> >> In other words, you scope the WSGIProcessGroup to WSGI script fel in file
> >> system.
>
> >> Rather than Directory/Files, you could also say:
>
> >> <Location /app>
> >> WSGIProcessGroup app
> >> </Location>
>
> >> so, as long as isn't qualified in one of those ways, will still run in
> >> embedded mode.
>
> >> Graham
>
> >> On Wednesday, 18 January 2012, Jonathan Thomas <
>
> >> [email protected]> wrote:
> >> > I am mostly looking for clarification here since nothing I read in the
> >> > docs specifically says you can't mix embedded and daemon modes,
> >> > although there is an implied either or which seems to be backed up by
> >> > empirical testing.
>
> >> > Which leads me to wonder whether it's possible and I've misconfigured
> >> > my server, or whether it's not possible.
>
> >> > Here is what I'm trying to do in the main server section of the apache
> >> > configuration.  In this scenario lets assume virtual hosts are
> >> > discouraged.  This configuration starts fine, and all urls are
> >> > reachable, but the only processes that are used are the ones defined
> >> > under the DaemonProcess directive (as determined by ps and looking at
> >> > the CPU time)
>
> >> > I'm using
> >> > httpd-2.2.20 in prefork mode
> >> > mod_wsgi-3.3
>
> >> > config snippet
> >> > ...
> >> > User nobody
> >> > ...
> >> > #Serve the first application under a separate user
> >> > WSGIDaemonProcess app user=admin processes=3 threads=1
> >> > WSGIScriptAlias /app/ /var/www/wsgi-scripts/pastedeploy-app.wsgi
> >> > WSGIProcessGroup app
>
> >> > #Then serve everything else using embedded mode.
> >> > WSGIScriptAlias / /var/www/wsgi-scripts/pastedeploy.wsgi
>
> >> > <Directory /var/www/wsgi-scripts>
> >> > Order allow,deny
> >> > Allow from all
> >> > </Directory>
>
> >> > A definitive answer would be most welcome, let me know if you need
> >> > more information.
> >> > -Jonathan
>
> >> > --
> >> > 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.
>
> > --
> > 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 
> > athttp://groups.google.com/group/modwsgi?hl=en.

-- 
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.

Reply via email to