Surf icon indicating copy to clipboard operation
Surf copied to clipboard

Cachetool tasks

Open t3easy opened this issue 7 years ago • 3 comments

Expected Behavior

Predefined task to flush apc/opcache with https://github.com/gordalina/cachetool

Actual Behavior

Not available

t3easy avatar Nov 04 '18 10:11 t3easy

Maybe this is the solution to my long term problem:

Server (TYPO3 CMS) TYPO3\Surf\Task\Php\WebOpcacheResetExecuteTask
Executing PHP opcache reset script at "https://example.com/surf-opcache-reset-xxx.php" did not return expected result

I get this error during almost every deployment process on a website behind a proxy server and My customer is so annoyed of this problem as right after the deployment is finished, the server responds with internal server error. One minute later everything is fine.

The typo3temp problem described here https://github.com/TYPO3/Surf/issues/295 also occurs very often but is really hard to reproduce.

simonschaufi avatar Feb 19 '20 00:02 simonschaufi

For me it solved the problem you describe @simonschaufi .

When using cachetool via HTTP like here https://gist.github.com/jonaseberle/9bfc29b3af726c41b3cd9cec088fc722 the only difference to WebOpcacheResetExecuteTask seems to be that the latter

  • create PHP script
  • transfer
  • switch symlink
  • access via HTTP

while the first (when configured as remote task) does

  • transfer
  • switch symlink
  • create PHP script
  • access via HTTP

-> This seems to help. I guess in our case it was about storage systems vs. webservers noticing the symlink switch. That problem does not seem to occur if the file is created after the symlink is switched.

Using --fcgi with cachetool is prefered, of course where possible.

jonaseberle avatar Jul 28 '21 10:07 jonaseberle

https://deployer.org/docs/7.x/contrib/cachetool

sabbelasichon avatar Feb 27 '23 08:02 sabbelasichon