Skip to content

Commit 7be5a4c

Browse files
committed
docs(Response): add PHP built-in server limitations for SSEResponse
1 parent 12888fb commit 7be5a4c

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

user_guide_src/source/outgoing/response.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,29 @@ use comments for keep-alive and configure the client retry interval:
266266

267267
.. literalinclude:: response/037.php
268268

269+
Development Server Limitations
270+
------------------------------
271+
272+
When testing SSE locally, keep in mind that PHP's built-in development server
273+
(used by ``php spark serve``) is not designed to handle long-lived streaming
274+
connections effectively.
275+
276+
Because an SSE connection remains open for an extended period, the built-in
277+
server may spend most of its capacity serving the stream. As a result, other
278+
requests may appear slow, blocked, or delayed while the SSE connection is active.
279+
280+
Possible symptoms include:
281+
282+
- normal HTTP requests appearing to hang or time out
283+
- API requests responding slowly
284+
- frontend requests remaining in a pending state
285+
286+
For more realistic testing, prefer a server stack that handles concurrent
287+
requests better, such as Apache, Nginx with PHP-FPM, or FrankenPHP.
288+
289+
This behavior is a limitation of the development server environment, not of
290+
``SSEResponse`` itself.
291+
269292
Production Considerations
270293
-------------------------
271294

0 commit comments

Comments
 (0)