Search code examples
laravelamazon-web-servicesnginxcapistrano

Capistrano on AWS - Always pointing to an old release


I'm deploying a Laravel app to AWS using Capistrano. It seems that if I have more than one release, the current symlink gets updated to the right release, but anytime i try and access the URL via the browser, it seems to hit an old release.

I can tell because a) my pushes aren't taking effect, and b) the logs are writing to the previous release's log file.

Any idea what this might be? I'm running on Ubuntu with nginx, and have the nginx root pointing to /path/to/current. I tried restarting nginx after each deployment, and that doesn't seem to help either


Solution

  • @Matt Brictson 's comment above led me in the right direction. PHP-FPM holds on to some cache, so I ended up doing a graceful restart and that seemed to resolve the symlinks to the correct locations on deploy.