-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker mode #1
Comments
Drupal 10 has Symfony 6. Dunno yet if it helps with the implementation. Update: I tried If I comment out So something still missing with Worker mode. Update 2: cannot get it working anymore 🤷 |
Not sure how to use https://github.com/el7cosmos/drupal-runtime. I setup it as instructed in the repo. Do I need to somehow change index.php so using the index.php from el7cosmos is not enough? Also don't know what to do with that template file. It seems that it just scaffolds index.php and update.php from assets folder. In docker-compose.yml I had |
This looks related to what is done in |
It looks like Drupal sessions aren't compatible with workers. They don't work with RoadRunner either: https://www.drupal.org/project/drupal/issues/2218651 |
I linked this issue to that issue on Drupal.org |
Is there any benefits using it not in worker mode comparing to php-fpm? Or it makes sense only after Drupal can clean-up session handling and adopt SF runtime? |
The last attept to make it work was https://gitlab.com/daffie/swoole |
I'm trying to make it work with
what would be the appropriate way to debug this kind of errors ? add xdebug extension to frankenphp ? install symfony-profiler ? |
@back-2-95 I did not use your composer.json, I just added composer commands to the Docker file --- a/Dockerfile
+++ b/Dockerfile
@@ -20,6 +20,11 @@ WORKDIR /opt/drupal
RUN set -eux; \
export COMPOSER_HOME="$(mktemp -d)"; \
composer create-project --no-interaction --no-progress "drupal/recommended-project:$DRUPAL_VERSION" ./; \
+ # Worker mode using Symfony Runtime
+ composer config allow-plugins.symfony/runtime 1; \
+ composer config --json --merge extra.drupal-scaffold.allowed-packages '["el7cosmos/drupal-runtime"]'; \
+ composer config extra.runtime.autoload_template vendor/el7cosmos/drupal-runtime/assets/autoload_runtime.template; \
+ composer require el7cosmos/drupal-runtime:1.0.x-dev; \
chown -R www-data:www-data web/sites web/modules web/themes; \
rm -rf /app/public; \
ln -sf /opt/drupal/web /app/public; \ |
@back-2-95 I just used a custom composer.json like you did (I copied it from a non docker install of |
Looking forward seeing what you can get done with it. Please check different challenges which were faced earlier like Drupal sessions. |
FYI session issue seems to be still there. |
So how to make sure I'm running in worker mode ? I installed the |
To be 100% sure, you can check if the |
Just a quick note here to say that we are using this in production, Drupal seems to work fine mostly with FrankenPHP. |
@Renrhaf thank for sharing, please elaborate what's missing in https://www.drupal.org/project/drupal/issues/3437187 |
Hi @andypost. Do you have a precise description of the problem? I can take a look next week. |
Currently, the worker mode of FrankenPHP isn't used.
The best way of supporting the worker mode would probably be to patch Drupal to use Symfony Runtime: https://www.drupal.org/project/drupal/issues/3313404
In the meantime, using this package or creating an ad-hoc implementation could do the trick.
The text was updated successfully, but these errors were encountered: