From 7be5a4ccae8cf7ce2cbc6943bd9de838e9973a06 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Sat, 27 Jun 2026 04:53:52 +0330 Subject: [PATCH 1/2] docs(Response): add PHP built-in server limitations for SSEResponse --- user_guide_src/source/outgoing/response.rst | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/user_guide_src/source/outgoing/response.rst b/user_guide_src/source/outgoing/response.rst index 042ca9c4c9f9..e0849382f1ab 100644 --- a/user_guide_src/source/outgoing/response.rst +++ b/user_guide_src/source/outgoing/response.rst @@ -266,6 +266,29 @@ use comments for keep-alive and configure the client retry interval: .. literalinclude:: response/037.php +Development Server Limitations +------------------------------ + +When testing SSE locally, keep in mind that PHP's built-in development server +(used by ``php spark serve``) is not designed to handle long-lived streaming +connections effectively. + +Because an SSE connection remains open for an extended period, the built-in +server may spend most of its capacity serving the stream. As a result, other +requests may appear slow, blocked, or delayed while the SSE connection is active. + +Possible symptoms include: + +- normal HTTP requests appearing to hang or time out +- API requests responding slowly +- frontend requests remaining in a pending state + +For more realistic testing, prefer a server stack that handles concurrent +requests better, such as Apache, Nginx with PHP-FPM, or FrankenPHP. + +This behavior is a limitation of the development server environment, not of +``SSEResponse`` itself. + Production Considerations ------------------------- From 57237fc496985a1e0f9b94822f8b9e877a9e13b1 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 29 Jun 2026 12:13:48 +0330 Subject: [PATCH 2/2] docs: use lowercase "nginx" for consistency Co-authored-by: John Paul E Balandan --- user_guide_src/source/outgoing/response.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/outgoing/response.rst b/user_guide_src/source/outgoing/response.rst index e0849382f1ab..b8a0adcbde67 100644 --- a/user_guide_src/source/outgoing/response.rst +++ b/user_guide_src/source/outgoing/response.rst @@ -284,7 +284,7 @@ Possible symptoms include: - frontend requests remaining in a pending state For more realistic testing, prefer a server stack that handles concurrent -requests better, such as Apache, Nginx with PHP-FPM, or FrankenPHP. +requests better, such as Apache, nginx with PHP-FPM, or FrankenPHP. This behavior is a limitation of the development server environment, not of ``SSEResponse`` itself.