-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
When HUP reloading, gunicorn does not reload updated packages which are installed into non-zip egg directories, when the updated package has a new version number. The installation looks something like:
site-packages/
├── easy-install.pth
├── SomePackage-v1.0-py2.7.egg
└── SomePackage-v1.1-py2.7.egg
If SomePackage-v1.1-py2.7.egg is added after the master gunicorn process loads and easy-install.pth is updated accordingly, the forked workers never see the change in sys.path.
This appears to be a limitation in how .pth files are loaded in site.py, which is done at the time the master gunicorn process loads. I asked about reliable reinitialization of sys.path including .pth files via site.py here:
http://mail.python.org/pipermail/distutils-sig/2012-September/018855.html
This is related to #394 such that symbolic linking would provide a solution.
My current workaround for package reloading is to sync the packages to a non-changing filepath (via rsync or git).