1

On the production server (nginx + gunicorn), after changes in the files, sometimes the changes are displayed, sometimes they are not displayed. After restarting the server, everything works correctly.

I thought it might be related to caches and tried different options (disabling caches, cleaning caches, etc.), but the problem remained. Also tried deleting the __pycache__ folders in different project directories, but that didn't help either

mknar
  • 11
  • 1
  • Changing what files? static content? – Chris Doyle May 19 '21 at 16:55
  • If it's static content maybe you can try force update with `Ctrl + f5` – thepylot May 19 '21 at 16:57
  • Does this answer your question? [how to restart only certain processes using supervisorctl?](https://stackoverflow.com/questions/9301494/how-to-restart-only-certain-processes-using-supervisorctl) – Ankit Tiwari May 19 '21 at 17:15
  • i guess you need to make sure server does not cache files in memory and your browser does not cache files in browser cache – AmaanK May 20 '21 at 04:20

1 Answers1

0

Restarting the server is required if you are making changes to the code, because, when the application is started the project code/files is loaded into the memory and any changes to it will not reflect until the server restarts.

If you are using supervisor to manage the processes, you can restart the server by

$ sudo supervisorctl restart <process_name>
Ranjan MP
  • 341
  • 1
  • 6