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 2022/04/07 12:08:33 UTC

[GitHub] [apisix] mcdullbloom commented on issue #6799: help request: upstream node has been specified, cannot be set repeatedly and 404 caused by farword to wrong backend

mcdullbloom commented on issue #6799:
URL: https://github.com/apache/apisix/issues/6799#issuecomment-1091655469

   We just request apisix normally. After I print the log, I find the upstream id in `api_ctx.matched_route.upstream_id` is not the same with `api_ctx.upstream_conf.upstream_id` . ( The qps is 100K for the apisix server, most of the request is ok with 200.We get 1 or 2  `404 `  every 10 minutes for a single domain name. So strange it is!)
   ```
   function _M.http_access_phase()
       local ngx_ctx = ngx.ctx
       -- always fetch table from the table pool, we don't need a reused api_ctx
       local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
       if api_ctx.upstream_conf ~= nil then
           api_ctx.upstream_conf = nil
       end
   ```
   After I  set the  `api_ctx.upstream_conf` to nil,we get the same upstream_id now. But the upstream doesn't have the node and it is in other upstream.
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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