403 Forbidden + Permission Denied - Temporarily?

Wojtak, Greg GregWojtak at quickenloans.com
Mon Jul 21 21:10:08 UTC 2014

I’m having a strange issue running nginx 1.4.5 and I’m hoping someone might have some ideas.

We have a Symfony based app that we use Capistrano to deploy.  The deploy keeps a few versions of the app around and rotates them off, so we’ll have two or three sitting out there.  The active version is made active by using a symlink for the document root, so we have something like:

/var/www/ourapp/current -> /var/www/ourapp/20140721

With “current” being the document root specified in the server block.

During the push, that symlink is removed and is set to use the new version.  Also as part of that push, a php file is generated to clear the APC cache for php-fpm, and then called via curl from our build/deploy server.

For a period of about 2 – 5 minutes, any calls to this APC cache clear script or to another db health check script we have fail with a 403 and the php logs have Permission denied errors.  I’ve checked the permissions on the file and on the all of the directories leading up to it and they are fine.  After the 2 – 5 minutes, it begins working consistently.

We found an article on stack exchange that sounded very similar to our issue that involved turning off sendfile, however this did not appear to affect the behavior at all.  We do not have any caching turned on.

Does anyone have any idea what could be going on here?



More information about the nginx mailing list