Comments (4)
Thank you.
For the shared hosting in question (Hetzner Level 19) this shows:
https://gist.github.com/jonaseberle/996d2a7dc930f89b2241bdef9706c3b7
I looked into deactivating the realpath cache: Unfortunately that's not possible on that shared hosting because the realpath_cache_..
settings are php.ini
only and only some select values from php.ini
(plus all that are changeable via .htaccess
php_value_...
) are configurable.
It would of course be possible to clear the realurl cache at runtime in the application. <- This is an option we consider to do for the default 120s cache lifetime after a deployment.
from cachetool.
This patch mostly succeeds with executing commands now (stat:clear
and opcache:reset
).
Yet our problems (post-symlink-switching-deployment PHP thinks some files are there which are not) remain and are well described by the linked article by Julien Pauli in the README. It is about the PHP realpath cache most probably.
Yet there is one catch with what is written in that article: I do not have any problems with the realpath/stat cache on systems where I can use cachetool with --fcgi
- this seems to catch all php-fpm threads. Can somebody confirm that?
Unfortunately on those 2 problematic hosters we do not have access from the web container to the php-fpm socket/port.
It can be explored by looking at
<?php
var_dump(realpath_cache_get());
clearstatcache(true);
which shows how that cache is thread-local and cache-clearing only acts on the current thread. (On some systems it is necessary to send No-Cache headers (by using CTRL+F5 to reload)).
So I am a bit at a loss here.
Should we say that not having the possibility to use --fcgi
means that deployment using symlink-switching is not doable in a stable way?
Is anybody aware how someone could deactivate the PHP realpath cache?
from cachetool.
Should we say that not having the possibility to use --fcgi means that deployment using symlink-switching is not doable in a stable way?
This is very likely.
Can you run the following command and display the results?
cachetool php:eval -vvv -r \
'return var_export([ini_get("realpath_cache_size"), ini_get("realpath_cache_ttl"), ini_get("open_basedir"), ini_get("safe_mode"), ], true);'
Is anybody aware how someone could deactivate the PHP realpath cache?
It's not a good idea to deactivate the cache, but for testing you can always set
realpath_cache_size=0
realpath_cache_ttl=0
from cachetool.
I am in the same boat. Even on managed vServers access to the PHP-FPM socket might be restricted and thus we cannot use --fcgi
- and --web
will sometimes fail for the aforementioned reasons.
from cachetool.
Related Issues (20)
- FastCGI.php line 114: Error: File not found. (when using configuration file) HOT 8
- Support for monolog/monolog ^3.0 HOT 1
- Exclude path not working with absolute path HOT 1
- PHP 8.2: ${var} string interpolation deprecated HOT 1
- apcu regex format validation HOT 1
- continuous updating message HOT 3
- Question: Can you install cachetool on 1 specific domain/subdomain instead of entire server HOT 2
- Question: About invalidation of specific scripts HOT 3
- Question: Getting weird errors HOT 2
- Heads up: This fails to work as of Rocky Linux 9.2 (In FastCGI.php line 114: Access Denied) HOT 22
- Invalid version string "@package_version@" with consolidation/self-update 2.2.0 HOT 5
- Tag 8.6.0 was removed, but still referenced in Packagist HOT 4
- opcache:reset FastCGI error: Unable to connect to FastCGI application: Permission denied (/run/php/php8.2-fpm.sock) HOT 1
- Question: Version compatibility HOT 1
- Not clearing cache after upgrading to php 8.1.13 + cachetool 9.1 HOT 7
- Apcu key fetch problem
- Add support for Symfony 7 HOT 4
- Question/request: Split cache library from CLI tool?
- It would be useful if output from opcache:status:scripts could be sorted by hits or memory HOT 1
- apcu get keys by regex HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cachetool.