Thursday, August 19, 2021

Re: Python code changes are not reflecting on Django-based web server.

I'd verify that the systemctl commands are actually starting and stopping httpd. Does the pid change?

On August 18, 2021 11:04:07 AM CDT, Hasan Baig <> wrote:

I have been hosting a django-based web server (httpd with mod_wsgi package) on Linux CentOS 7. I used to reflect the changes made in my code by restarting the web server using the following commands:

sudo systemctl stop httpd
sudo systemctl start httpd

and it would reflect the changes smoothly. Since few days back, this strategy has not been work at all. That is, whenever I make any changes in my python code, even simply printing a message in log file, it is not reflected. To reflect the changes every time, I have to reboot the VM. I tried the following things already which did not help at all:

• Clearing .pyc files
• Restarting/Reloading httpd server
• touch wsgi file
• http is running without caching or proxying (modules have been commented out)

All of the above mentioned tries did not appear to work. The changes are only reflected once when the VM is rebooted. 

What do I need to do to make the code changes reflected without rebooting the VM every time? Any clues, help or suggestions are highly appreciated.



No comments:

Post a Comment