(I tried sending this earlier, but it didn't go through for some reason. Let's try this again...)
Chandra is right - uWSGI has to reload the application somehow for changes to be picked up. (Django's development runserver contains an auto-reloader - that's why you're getting changes instantly.) But let me count the ways (that I can think of - this is uWSGI country after all, the ways can't stop here) you can reload your app with uWSGI. * If you're using uWSGI in Emperor mode (which you probably aren't, since you've `daemonize` in your configuration), touching a vassal INI file will reload uWSGI. * For standalone uWSGI, you can add the `touch-reload = /file/name/here` stanza. This will make uWSGI reload itself when the modification time of that file changes. You can, if you want, configure touch-reload with the INI filename itself - and to save you some time and be more resilient against silly typos, you can even use the %p magic variable (see http://uwsgi-docs.readthedocs.org/en/latest/Configuration.html#magic-variables) - simply adding `touch-reload = %p` should magically get you the touch-the-INI-and-uWSGI-reloads behavior Chandra described. * You can send the uWSGI master process the `SIGHUP` signal to have it reload itself. See http://uwsgi-docs.readthedocs.org/en/latest/Management.html * You can also add a Master FIFO (http://uwsgi-docs.readthedocs.org/en/latest/MasterFIFO.html) and use it to send a reload command to your instance. * For Python apps, uWSGI also happens to have an auto-reloader, but this is obviously for development purposes only. For actual deployments, you'll want to use a more controlled way. http://uwsgi-docs.readthedocs.org/en/latest/Options.html#py-auto-reload Hope this helps! Best regards, Aarni Koskela From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of AMARASINGHAM, Chandra Sent: 4. joulukuuta 2014 8:59 To: uWSGI developers and users list Subject: Re: [uWSGI] nginx+uwsgi+django, there seems to be some strange cache in uwsgi Hi Manivel, As per my understanding you do have to reload uwsgi to pick up changes to python files. One way to do this is to run touch on the ini file which should gracefully reload uwsgi I think in most instances... Chandra Chandra Amarasingham Analyst Programmer Specialist Diagnostic Services Pty Ltd 17 Enterprise Grove, Mt Helen, 3350 Federation University Technology Park T: (03) 5330 1056 ext 212 This email (including any attachments) is intended only for the addressee. It may contain confidential or legally privileged information. Confidentiality and privilege are not waived or lost if you are not the intended recipient of this email, nor may you use, review, disclose, disseminate or copy any information contained in or attached to it. If you receive this email in error, please delete it and any attachments from your system and notify us immediately. It is your responsibility to check this email and any attachments, before opening or using them, for viruses or defects. You assume all liability arising from opening or using this email and any attachment. ________________________________ From: [email protected]<mailto:[email protected]> [[email protected]] on behalf of Manivel Rajendran [[email protected]] Sent: Thursday, 4 December 2014 5:52 PM To: uWSGI developers and users list Subject: [uWSGI] nginx+uwsgi+django, there seems to be some strange cache in uwsgi Hi, The django works fine, but modified pages can't be seen unless i restart uwsgi. i didn't config anything about cache. It works well with "python manager runserver", but have this problem when working with nginx+uwsgi. This is my "uwsgi.ini" file [uwsgi] socket=/var/run/uwsgi/test_uwsgi.sock virtualenv=/test/django_test/test_virtualenv chdir=/test/django_test/test module=test.wsgi:application uid=apache gid=apache master=True workers=8 pidfile=/test/django_test/test/uwsgi-master.pid max-requests=5000 daemonize=/var/log/uwsgi/django_test.log Kindly help me. Thanks & Regards Manivel Rajendran
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
