Files
2012-02-21 01:15:00 -05:00

1 line
2.3 KiB
JSON

[{"user_id": 24931, "stars": [{"date_created": 1311253359.7171631, "user_id": 14679}, {"date_created": 1311622117.332159, "user_id": 1736}], "topic_id": 42388, "date_created": 1311207289.155411, "message": "I've just set up the Chef Application cookbook with a django app and gunicorn, however I've been having some issues. After deploys, sending gunicorn a HUP signal doesn't cause it to pull in any new changes. The reason is because gunicorn starts up and pulls it's current working directory with os.getcwd() (https://github.com/benoitc/gunicorn/blob/master/gunicorn/app/djangoapp.py#L22). Well, turns out that Python likes to resolve symbolic links (http://stackoverflow.com/questions/442442/how-to-know-when-you-are-in-a-symbolic-link), which means that the working directory will be something like /.../releases/74cd66bac5a8e6e17d7862d77af6f26fde9aeaa6/... ", "group_id": 81, "id": 1685934}, {"user_id": 24931, "stars": [], "topic_id": 42388, "date_created": 1311207348.198035, "message": "But I see so many people talking about using symlinks with Django and Gunicorn for deployment. There has to be a solution around this and it has to be a solved problem. Right?", "group_id": 81, "id": 1685947}, {"user_id": 281, "stars": [], "topic_id": 42388, "date_created": 1311256239.0526891, "message": "Generally speaking I think most people just restart the gunicorn process instead of using hup. Technically it does take longer but for most django applications the difference is trivial", "group_id": 81, "id": 1689309}, {"user_id": 24931, "stars": [], "topic_id": 42388, "date_created": 1311274563.154089, "message": "The problem with restarting gunicorn is that you get 503 errors from nginx while gunicorn is restarting; which isn't a good user experience. And I'd rather not have to put up a maintenance page everytime I deploy.", "group_id": 81, "id": 1691553}, {"user_id": 24931, "stars": [], "topic_id": 42388, "date_created": 1311596931.3462789, "message": "I know preload_app makes gunicorn use less memory, but does it also make process forking faster too?", "group_id": 81, "id": 1714909}, {"user_id": 24931, "stars": [], "topic_id": 42388, "date_created": 1311596879.0127101, "message": "Since the code underneath gunicorn would not be changing when symlinks are used, I could turn on the `preload_app` setting. Does this make gunicorn start up faster?", "group_id": 81, "id": 1714907}]