Replies: 4 comments
-
|
You probably don't need to run the polling inside a web app context. So I'd recommend just creating a simple cli script and executing that instead. or with a some kind of supervisor configuration (and 3 processes) There have been feature requests to add some kind of functionality like this directly to FrankenPHP (for convenience) and it might be possible in the future. Not possible currently though. |
Beta Was this translation helpful? Give feedback.
-
|
It sounds like you've stumbled into the same issue as I did. What does your task definition set your container command to, when using FrankenPHP? |
Beta Was this translation helpful? Give feedback.
-
|
I haven't gotten that far yet. Right now (before FrankenPHP) I'm using supervisord like so, with no entrypoint or command overrides: [program:sqs-poller] I am going to play around with |
Beta Was this translation helpful? Give feedback.
-
|
We’re using this running on a slightly older version of FrankenPHP: https://gist.github.com/withinboredom/932fa21c6ea670f24ba7f26660460366 It listens to a SQS queue, then passes that to a php endpoint as a request, then outputs the response to a RabbitMQ endpoint. It is pretty basic, but it works well enough that nobody has touched it in almost a year now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have a raw php web site that does not use Laravel, Symfony or other frameworks. We use AWS SQS to push jobs to a separate container and have a poller script written in php to query SQS and then handle the jobs. This container runs in ECS, and while it's not the most elegant solution, it does work.
We're looking to migrate from nginx+php-fpm+supervisord to FrankenPHP. We've gotten the site working quickly and easily.
My question is around worker mode and whether it would be a good use case for our SQS poller? I've attempted to get this to work with no luck yet. The poller script is simply a continuous loop, and when I attempt to set it up as a worker, it does run, but then starts to throw
worker script has not reached frankenphp_handle_requesterrors and eventually tears down. I've tried modifying the code based on the docs, Googling, and suggestions from ChatGPT without luck. I saw in a previous post that the worker script must be index.php, but I am not sure that's still true, and changing it didn't work, regardless.Beta Was this translation helpful? Give feedback.
All reactions