> On 7 Jun 2019, at 5:16 am, Gertjan Klein <[email protected]> wrote:
>
> Gertjan:>> If I'm not mistaken, mod_wsgi_express runs in a virtualenv?
>
> Graham:
>> If you are using virtual environments, yes, it would be installed into that.
>> Each virtual environment would have its own copy if you had more than one,
>> allowing different Python versions to be used. A separate instance of it
>> would be run for each application in respective virtual environments.
>
> Apologies, I see now that I did not mention this in my original post. Yes, I
> use virtual environments for all applications. (Two use Django, two use
> Flask.) Do you see any disadvantages in such a setup?
>
> Graham:> That combined with a typical Apache installation not being setup
> very well for Python applications, means that total memory usage may not be
> much different, especially if using frameworks like Django. In fact, the
> better configuration of mod_wsgi-express may make it better overall if you
> weren't using daemon mode, as you can tune further each mod_wsgi-express
> instance to needs of a specific application. This means if you have one
> application that needs a multi process configuration, you aren't then
> bloating out size used by others unnecessarily. Memory use would be least of
> my concerns.
>
> I'm not sure what you're saying here. The setup I thought you were suggesting
> was one mod_wsgi (express) for each application, all of them behind the
> "system" Apache functioning as a proxy.
And I am. When you run mod_wsgi-express, you are still running Apache with
mod_wsgi, you are just running a separate instance to the main system Apache,
with a configuration generated by mod_wsgi-express. So comparing memory usage
from the mod_wsgi-express instances to running similar with system Apache only.
> I don't know if I am currently us "daemon mode", Apache setup is a black art
> to me. I have currently made no special provisions for the applications (that
> I can think of), other than specify WSGIScriptAlias. I did do (I see now)
> some configuration in wsgi.conf: WSGIDaemonProcess and WSGIProcessGroup.
The WSGIDaemonProcess and WSGIProcessGroup directives are setting up daemon
mode. But if not using WSGIRestrictEmbedded, and WSGIApplicationGroup %{GLOBAL}
(in context of each daemon process group), plus various other Apache settings
to control its memory usage, then the Apache instance would be using more
memory than it needs to. When you use mod_wsgi-express, the generated Apache
configuration it uses contains all the tricks to reduce memory usage and why
saying it could well end up using less.
> I don't expect tuning to be necessary, but it would be nice, if I felt the
> urge to try some, that the results be contained to one site, and not
> influence all of them like now. It seems the mod_wsgi per virtualenv is ideal
> for that.
>
> Graham:
>> There wasn't any real interest in the community for having curated container
>> images for Python web application hosting that used best practices. Everyone
>> wanted to build their own from scratch. After all, docker was a shiny new
>> tool and was silly to think you could deprive people of their opportunity to
>> waste lots of time learning it, making lots of mistakes, but still come up
>> with only a half baked solution that sort of worked. ;-)
>
> I've had too many occasions of not understanding Apache and/or mod_wsgi
> configuration not to appreciate having that done right for me. :-) It is
> unfortunate that the images didn't get more interest.
>
> I would like to move to the latest available Python version. Docker was
> certainly an option for me, but it seems that it would require perhaps even
> more tinkering than virtualenv+mod_wsgi-express. So currently that is my
> favorite option. (I won't have time to actually try something until the
> weekend.)
>
> Thanks again, regards,
> Gertjan.
>
>
>
>
>
> --
> 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 https://groups.google.com/group/modwsgi.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/modwsgi/qdbor5%246dul%241%40blaine.gmane.org.
> For more options, visit https://groups.google.com/d/optout.
--
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 https://groups.google.com/group/modwsgi.
To view this discussion on the web visit
https://groups.google.com/d/msgid/modwsgi/520FF5CA-980C-47B8-98FD-D1C8D81F69F9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.