Skip to content

Follow symlinks to get HUP reloading working #394

@streeter

Description

@streeter

Based off a discussion thread on the mail list, I'm creating a ticket to track this. What started the discussion was my production setup.

I'm trying to deploy gunicorn 0.14.3 with django 1.4.1 and running into some issues with HUP'ing gunicorn to reload the code.

I've got a deploy setup where I symlink the current release to a directory and then switch the symlink to point to the next release on deploy. I want to send gunicorn a HUP signal to just reload the new code, but this isn't working as gunicorn starts and resolves it's current directory to be the absolute reference on the filesystem. So if the directory layout is like this:

/var/www/
    - current -> releases/<hash1>
    + releases/
        + <hash1>/
        + <hash2>/

However, when gunicorn starts in the directory /var/www/current/, it resolves it to /var/www/releases/hash1/ instead. So even though I switch current to point to hash2, sending a HUP to gunicorn will not pick up the new code.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions