cachetool: file_get_contents() call failed with url

I’ve installed Version 6.1.1 and sometimes got the following error:

SYMFONY_ENV=prod php bin/cachetool opcache:reset --web --web-path=/var/www/html/example.org/public --web-url=https://example.org

As you can see its a symfony webapplication. An Apache-VHost is configured with the DocumentRoot equal to /var/www/html/example.org/public.

Do you have any hint or suggestions? Its maybe the same issue as #145 .

Now trying to set the symlink target (which is the DocRoot) for --web-path

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

The problem is most likely that cachetool is not working, because apache/php still has the old “current” folder cached and the newly created files are not accessible. Try calling cachetool on the previous release folder.

maybe it would be a good idea to specify both folders for cachetool and it tries both (previous and current) with previous first, one of them should work after all and only fail if it fails for both folders.

or to add some retry count with a sleep in between because after a while the new folder should work though I think the previous / current folder option would probably be best.

Can you try the new SymfonyHttpClient available in cachetool 6.2.0? Pass --web=SymfonyHttpClient as an argument to use this new adapter