Does the Frankenphp symfony Runtime class run only once in worker mode? #1480
-
|
I have a custom symfony runtime that accesses HTTP headers, when extending this runtime from Frankenphp's own symfony runtime I find that HTTP headers are missing. I guess it makes sense that the runtime is only run once and lacks access to http headers since those are per request but wanted to confirm from other contributors. Related question: If I cannot access HTTP headers in the Runtime, what's the next best place to access them in a Symfony app, I want to access them as soon as possible in the request processing cycle. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
How are you creating a new request? Headers should be present in Is your question if this class is just run once? |
Beta Was this translation helpful? Give feedback.
The worker script is run in a loop. When it's done, it just starts again. During each run, the worker script handles an amount of requests through calling frankenphp_handle_request in another loop. The amount of requests is usually limited to reduce the impact of potential memory leaks.