ShenFeng312 commented on issue #10620:
URL: https://github.com/apache/apisix/issues/10620#issuecomment-2144206197

   The bug is caused by differences between OpenResty and Nginx.
   
   In Nginx's `ngx_http_upstream.c`:
   ``` c++
   if (!u->request_body_sent) {
       u->request_body_sent = 1;
   
       if (u->header_sent) {
           return;
       }
   
       ngx_add_timer(c->read, u->conf->read_timeout);
   
       if (c->read->ready) {
   #if (T_NGX_MULTI_UPSTREAM)
           if (u->multi) {
               ngx_http_multi_upstream_read_handler(c);
               return;
           }
   #endif
           ngx_http_upstream_process_header(r, u);
           return;
       }
   }
   ```
   The added `read_timeout` is `u->conf->read_timeout`.
   
   However, in OpenResty, due to the `HAVE_NGX_UPSTREAM_TIMEOUT_FIELDS` macro, 
OpenResty directly uses `u->read_timeout`.
   
   But `the ngx_multi_upstream_module` does not account for this difference.


-- 
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