rocketeer icon indicating copy to clipboard operation
rocketeer copied to clipboard

nginx symlink caching issue

Open sweebee opened this issue 5 years ago • 2 comments

After each deploy i run php -r "opcache_reset();" and i've added

fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;

to /etc/nginx/fastcgi.conf

But it still redirects to the old release. What is the best way to solve this?

sweebee avatar Sep 18 '18 07:09 sweebee

You can use cachetool (by pulling the PHAR during deploy) which has an opcache:clear command that should work in theory

Anahkiasen avatar Sep 18 '18 08:09 Anahkiasen

The problem with that is that it requires root access.

I found a different solution that seems to work. I've created a php file with

<?php
opcache_reset();

and call it with curl.

sweebee avatar Sep 18 '18 08:09 sweebee