You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/25 02:21:32 UTC

[GitHub] [apisix] yxudong commented on issue #4301: bug: skywalking not work when upsteam timeout

yxudong commented on issue #4301:
URL: https://github.com/apache/apisix/issues/4301#issuecomment-847480765


   The specific case is here.
   
   > location = /test {
   >     rewrite_by_lua_block {
   >         skywalking_tracer:start("upstream service")
   >     }
   > 
   >     proxy_pass http://test_upsteam;
   >     proxy_connect_timeout 1;
   >     proxy_send_timeout 1;
   >     proxy_read_timeout 1;
   > 
   >     body_filter_by_lua_block {
   >         if ngx.arg[2] then
   >             skywalking_tracer:finish()
   >         end
   >     }
   > 
   >     log_by_lua_block {
   >         skywalking_tracer:prepareForReport()
   >     }
   > }
   
   The proxy_read_timeout config is 1s.
   When http://test_upsteam reponse time more than that, nginx will has error log
   
   > upstream timed out (110: Connection timed out) while reading response header from upstream, xxxxxxxxxx
   
   In this case, the http request will not execute body_filter_by_lua phase, and `sw_tracer:finish` function is not be called also.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org