Your configuration says you are using daemon mode and not embedded mode. You
don't want to be using embedded mode.
For restarting just specific daemon process groups see:
http://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html
<http://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html>
In short, touch the WSGI script file.
One can also send a SIGTERM to daemon processes.
If you set up graceful-timeout option as well, then can use SIGUSR1 on daemon
processes to do a form of graceful restart on just the daemon processes as well.
There is also an eviction-timeout option if need to distinguish timeout for a
graceful restart signal vs graceful restart on request timeout or maximum
requests.
For details on timeouts see:
http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html
<http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html>
Graham
> On 11 Jun 2017, at 6:56 AM, Jaqen Nki <[email protected]> wrote:
>
> hey, is there easy way to avoid constant 'sudo service apache2 restart' for
> every code change in my project? its really redundant. Im using embedded
> mode to be able to dev multiple sites if needed. I tried nginx/gunicorn
> config but found apache to be way smoother for some reason (was getting lots
> of 503 bad gateways on nginx and slower loads). heres my config:
>
> <VirtualHost *:80>
> ServerName djang0.me
> WSGIDaemonProcess djang0 python-home=/var/www/djang0/venv
> python-path=/var/www/djang0/djang0
> WSGIProcessGroup djang0
> WSGIApplicationGroup %{GLOBAL}
> WSGIScriptAlias / /var/www/djang0/djang0/djang0/wsgi.py
> <Directory /var/www/djang0/djang0/djang0/>
> <Files wsgi.py>
> Order allow,deny
> Allow from all
> </Files>
> </Directory>
>
> Alias /static /var/www/djang0/djang0/static
> <Directory /var/www/djang0/djang0/static>
> Order allow,deny
> Allow from all
> </Directory>
>
> Alias /robots.txt /var/www/djang0/djang0/static/robots.txt
> #Alias /favicon.ico /var/www/djang0/djang0/static/favicon.ico
>
> Alias /media /var/www/djang0/djang0/media
> <Directory /var/www/djang0/djang0/media>
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/www/djang0/logs/a2/error.log
> LogLevel warn
> CustomLog /var/www/djang0/logs/a2/access.log combined
> </VirtualHost>
--
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.
For more options, visit https://groups.google.com/d/optout.