Symfony app with worker mode use clean process on every request #1053
Closed
IndraGunawan
started this conversation in
General
Replies: 1 comment
-
|
solved the question. it because https://frankenphp.dev/docs/performance/#number-of-threads-and-workers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i experimented FrankenPHP worker and a Symfony app with a stateful service
i created a reproducer repo here https://github.com/IndraGunawan/test-dunglas-symfony-docker
I have a service that changes the property value on a method call https://github.com/IndraGunawan/test-dunglas-symfony-docker/blob/main/src/Services/Counter.php#L14-L17 and I call the method on a controller https://github.com/IndraGunawan/test-dunglas-symfony-docker/blob/main/src/Controller/HelloController.php#L19
when I open the link that calls HelloController the output is always
I do expect the counter to increase every time I visit the URL as worker mode boot once and keep the app in memory
then I tried to run in an iteration
the counter will be changing on every 25th iteration
Beta Was this translation helpful? Give feedback.
All reactions