I changed a .py file and changes reflected on local dev. server for Django after deleting .pyc. The production server does not even have .pyc for this specific file. Tried touching apache wsgi and restarting apache on prod. server but no luck. Even deleting this .py file makes application work the same. There is memcached installed but I don't have much idea how it caches, there is .git as well and 5 servers are hosting - one main, 4 load balancers.
我更改了.py文件和本地开发中反映的更改。删除.pyc后的Django服务器。生产服务器甚至没有.pyc用于此特定文件。尝试触摸apache wsgi并重新启动apache on prod。服务器,但没有运气。即使删除此.py文件也会使应用程序工作正常。安装了memcached,但我不知道它是如何缓存的,还有.git和5台服务器托管 - 一个主要的,4个负载平衡器。
Regards !
问候 !
3 个解决方案
#1
8
Are 100% sure you are looking at the right server you are making the changes to? I know that sounds stupid but, why don't you stop Apache, can you still run the page then? IF you can then you definitely don't have the correct server.
您是100%确定您正在查找正在进行更改的正确服务器吗?我知道这听起来很愚蠢但是,你为什么不停止Apache,那么你还能运行这个页面吗?如果你可以,那么你肯定没有正确的服务器。
If not, next try reloading Apache (thats different from restarting).
如果没有,接下来尝试重新加载Apache(与重启不同)。
sudo service apache2 reload
If this still does not work then post your Apache setup, if must be looking on the wrong folder to the one your pushing to.
如果这仍然不起作用,那么发布您的Apache设置,如果必须查找错误的文件夹到您推送的文件夹。
#2
2
You have to restart your server (WSGI, UWSGI or whatever your use on production environment)
您必须重新启动服务器(WSGI,UWSGI或您在生产环境中使用的任何内容)
#3
1
If you use uwsgi as gateway set touch-reload param in uwsgi settings and you need just
如果您在uwsgi设置中使用uwsgi作为网关设置触摸重新加载参数,您只需要
$ touch <your-touch-reload-file>
in console for reflecting on changes
在控制台中反映变化
If you use apache with mod_python or mod_wsgi, you have to restart apache for apply changes
如果将apache与mod_python或mod_wsgi一起使用,则必须重新启动apache才能应用更改
#1
8
Are 100% sure you are looking at the right server you are making the changes to? I know that sounds stupid but, why don't you stop Apache, can you still run the page then? IF you can then you definitely don't have the correct server.
您是100%确定您正在查找正在进行更改的正确服务器吗?我知道这听起来很愚蠢但是,你为什么不停止Apache,那么你还能运行这个页面吗?如果你可以,那么你肯定没有正确的服务器。
If not, next try reloading Apache (thats different from restarting).
如果没有,接下来尝试重新加载Apache(与重启不同)。
sudo service apache2 reload
If this still does not work then post your Apache setup, if must be looking on the wrong folder to the one your pushing to.
如果这仍然不起作用,那么发布您的Apache设置,如果必须查找错误的文件夹到您推送的文件夹。
#2
2
You have to restart your server (WSGI, UWSGI or whatever your use on production environment)
您必须重新启动服务器(WSGI,UWSGI或您在生产环境中使用的任何内容)
#3
1
If you use uwsgi as gateway set touch-reload param in uwsgi settings and you need just
如果您在uwsgi设置中使用uwsgi作为网关设置触摸重新加载参数,您只需要
$ touch <your-touch-reload-file>
in console for reflecting on changes
在控制台中反映变化
If you use apache with mod_python or mod_wsgi, you have to restart apache for apply changes
如果将apache与mod_python或mod_wsgi一起使用,则必须重新启动apache才能应用更改