membphis commented on code in PR #13255:
URL: https://github.com/apache/apisix/pull/13255#discussion_r3107926053


##########
apisix/plugins/ai-providers/base.lua:
##########
@@ -361,6 +361,13 @@ function _M.parse_streaming_response(self, ctx, res, 
target_proto, converter)
         else
             plugin.lua_response_filter(ctx, res.headers, chunk)
         end
+
+        -- Yield to the nginx scheduler so other coroutines on this worker

Review Comment:
   It doesn't completely prevent CPU exhaustion; it only prevents the current 
request from monopolizing CPU resources. 
   It's a temporary, quick fix, but it doesn't truly solve or avoid the problem.
   
   Create a todo issue and update the current code comments to clarify that the 
current fix is ​​only a workaround, not a real solution.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to