[uWSGI] Monitoring uwsgi in shared-hosting

Dorian Hoxha dorian.hoxha at gmail.com
Tue Apr 7 17:56:49 CEST 2015


So I should just add a flock=somefile.ini and run the process like I
already do ?

On Tue, Apr 7, 2015 at 2:23 PM, Roberto De Ioris <roberto at unbit.it> wrote:

>
> > Hi list,
> >
> > I'm running uwsgi on a shared-hosting so I don't have access to
> > upstart,systemd etc, and I want to start it if it crashes or when the
> > server is restarted.
> >
> > I currently have a cron-job running every 5 minutes, doing:
> >
> > uwsgi --ini uwsgiconfig.ini
> >
> > I see that the process-id inside the uwsgi.pid file changes everytime.
> > Is this ok?
> > My config:
> >
> > [uwsgi]
> > http = :5000
> > wsgi-file = manage.py
> > callable = app
> > master = 1
> > processes = 2
> > static-map = /static=app/static
> > daemonize = uwsgi.log
> > pidfile = uwsgi.pid
> > single-interpreter = 1
> >
> >
>
> In this way you are spawning a new instance every 5 minutes (albeit it
> will fail as it will find port 5000 busy). It will work (even if it is
> pretty ugly), but maybe i would use the --flock option
>
>
> --
> Roberto De Ioris
> http://unbit.com
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20150407/07054d93/attachment.html>


More information about the uWSGI mailing list