Giter Club home page Giter Club logo

Comments (15)

gordalina avatar gordalina commented on July 19, 2024

Are you resetting the cache after symlinking? Can you post the deploy script (a slimmed down version).

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

Yes, the reset happens after the symlink switch. But we also tried before and even after the switch at the same time to no avail.

We are using Rocketeer for deployment so there is not really a "script", only a configuration and a set of tasks which are run at specific stages during the deployment.

We've hooked the Opcache reset directly after the symlink switch so it is really the last thing that is done during deployment. (Except of cleanup of old releases.)

Anyways here's a vastly slimmed down excerpt of the last deployment log:

...
[user@host] (connection) No migrations performed.
connection/0 |=> Sharing file /var/www/project/releases/20160216181832/foo
$ ln -s /var/www/project/shared/foo /var/www/project/releases/20160216181832/foo-temp
$ mv -Tf /var/www/project/releases/20160216181832/foo-temp /var/www/project/releases/20160216181832/foo
...
connection/0 |=> Successfully deployed release 20160216181832
connection/0 |-- Closure fired by deploy.after [~1.45s]
$ cd /var/www/project/releases/20160216181832
$ /usr/bin/php /var/www/project/releases/20160216181832/typo3cms cache:flush --force
$ /usr/bin/php /var/www/project/releases/20160216181832/typo3cms cache:warmup
[user@host] (connection) Flushed all caches.
[user@host] (connection) Warmed up the following caches: classes, package manager, tca, ext_tables, ext_localconf
connection/0 |-- Closure fired by deploy.after [~1.79s]
$ cd /var/www/project/releases/20160216181832
$ /usr/bin/php /var/www/project/releases/20160216181832/bin/cachetool opcache:status
[user@host] (connection) ...
connection/0 |-- ClearOpcodeCacheTask (Performs tasks on opcode caches) fired by deploy.after
$ cd /var/www/project/releases/20160216181832
$ /usr/bin/php /var/www/project/releases/20160216181832/bin/cachetool opcache:reset
connection/0 |-- Closure fired by deploy.after [~1.79s]
$ cd /var/www/project/releases/20160216181832
$ /usr/bin/php /var/www/project/releases/20160216181832/bin/cachetool opcache:status
[user@host] (connection) ...
connection/0 | Cleanup (Clean up old releases from the server)
$ rm -rf /var/www/project/releases/20160212170134

from cachetool.

gordalina avatar gordalina commented on July 19, 2024

Try clearing the realpath cache before or after the opcache reset:
cachetool stat:clear

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

@gordalina Didn't think of that, thanks I'll give it a try.

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

No luck, still getting errors after deployment. :-X I just saw this in the PHP-FPM logs though:

[18-Feb-2016 10:35:06] WARNING: [pool www] child 16153 said into stderr: "zend_mm_heap corrupted"
[18-Feb-2016 10:35:06] WARNING: [pool www] child 16153 exited with code 1 after 61793.224488 seconds from start
[18-Feb-2016 10:35:06] NOTICE: [pool www] child 25421 started

from cachetool.

gordalina avatar gordalina commented on July 19, 2024

That looks like a very specific error, did you try these solutions?

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

@gordalina I've also searched for this and saw the same suggestions but I fear none of them will help.

As for USE_ZEND_ALLOC=0 the manual says this:

Note: USE_ZEND_ALLOC=0 in the environment will stop the memory manager from functioning, all allocations fall back on the default system allocators which can be useful for debugging leaks.

This sounds more like a debugging measure and I'm not sure if this is something one wants in a production environment...

from cachetool.

gordalina avatar gordalina commented on July 19, 2024

Did you try reloading php-fpm after cachetool? It restarts the workers a gracefully.

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

This would be one of the remaining options which I tried to avoid due to requiring sudo. So far mod_realdoc also doesn't see to yield the expected results.

Do you mean that there will be no downtime when restarting PHP-FPM?

from cachetool.

gordalina avatar gordalina commented on July 19, 2024

Have a look here

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

@gordalina Thanks, so this is about reload vs. restart. Seems like it isn't that graceful either and the SO comment only mentions APC so I'm not sure about the Opcache behavior here.

from cachetool.

gordalina avatar gordalina commented on July 19, 2024

Not sure if I can be of further assistance. I'm closing this issue.
Feel free to reopen any time, or post a comment if you've found a solution.

from cachetool.

mbrodala avatar mbrodala commented on July 19, 2024

@gordalina Thanks already for taking time to give me pointers here. I now went with PHP-FPM restart and so far it looks OK-ish in 90% of the deployments. I still saw an error once but I'll keep watching.

from cachetool.

pySilver avatar pySilver commented on July 19, 2024

Heh after few days of using cachetool I also started seeing this kind of behavior in my environment. Once cache is cleared – all require_* calls fails.

from cachetool.

pySilver avatar pySilver commented on July 19, 2024

Hopefully this would solve the issue: zendtech/ZendOptimizerPlus#126 (comment)

opcache.use_cwd = 1
opcache.revalidate_path = 1

from cachetool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.