Closed arku31 closed 2 years ago
Hey @arku31, thanks for the report. You can safely (temporarily) remove this check. That's because the RR and PHP-Worker
approach to check available plugins had been changed recently and weren't synced recently.
Hey, I just had a hard time to debug this behaviour: The isAvailable()-method in the php roadrunner-kv library seems to stopped working for roadrunner > v.2.6.2. Maybe it makes sense to just update the documentation or fix roadrunner to output the kv module as available module again. Btw the kv module works fine over rpc.
@brgmn Hey. Sorry for the bad UX 😭 . Yeah, you may just remove this call. We will resolve this in the v2.9.0
. We need to decide how to provide an available plugins list to the PHP, so, basically, there are 2 options:
@rustatian Ok. Nice! Thanks for your fast response and your great work! And do you think it would make sense to update the Readme and documentation of the roadrunner-kv php package that isAvailable doesn't work for roadrunner >v.2.6.2?
Btw I'm just using roadrunner as nginx-fpm replacement and the usecase I'm trying to solve is to warmup roadrunner kv-caches asynchronously by normal laravel events/workers running outside of roadrunner (e.g. when eloquent objects are updated). My goal is to always have warm caches in all roadrunner requests/workers. But maybe I'll have to write a dedicated varnish-like middleware for roadrunner (including cache-tags, etc). Anyways: my first tests with the kv module look really promising.
@brgmn You are welcome 🚀
But maybe I'll have to write a dedicated varnish-like middleware for roadrunner (including cache-tags, etc).
We already have this on the roadmap link. Some of the proposals are partly implemented via cache
middleware (RFC 7234, Cache-Control
, Age
, max-age
via in-memory storage and only for the GET requests).
To warm up caches you may use the on_init
server option (if that is suitable): https://github.com/roadrunner-server/roadrunner/blob/master/.rr.yaml#L28. The command in this option is not necessary a worker. It can be any PHP/bash/bat script or even any binary 😃
EDIT: The on_init
script will be fired before the workers are allocated.
And do you think it would make sense to update the Readme and documentation of the roadrunner-kv php package that isAvailable doesn't work for roadrunner >v.2.6.2?
Yeah, sure, will do that.
And do you think it would make sense to update the Readme and documentation of the roadrunner-kv php package that isAvailable doesn't work for roadrunner >v.2.6.2?
Yeah, sure, will do that.
Done.
Done, removed/deprecated this method everywhere 😃
No duplicates 🥲.
What happened?
According to docs, you may check that kv plugin is present
But it always leads to the error
Fatal error: Uncaught LogicException: The "kv" RoadRunner plugin not available in ...
If you remove this check and try to access kv directly, it is working without issues.
Version
2.6.3
config:
Relevant log output