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/03/08 04:08:32 UTC

[GitHub] [apisix] whioue opened a new issue #6540: bug: health check Sometimes there is data, sometimes there is no data

whioue opened a new issue #6540:
URL: https://github.com/apache/apisix/issues/6540


   ### Issue description
   
   1.当我配置了upstream的主动以及被动健康检查,关联route并成功转发请求后,使用curl频繁访问/v1/healthcheck,发现有时返回数据,有时不返回数据。
   2.我还发现使用不同的终端(浏览器和postman)频繁访问/v1/healthcheck,发现postman能获取数据,浏览器却获取不到,如下:
   浏览器:
   ![image](https://user-images.githubusercontent.com/47098518/157162845-e1bc8a7b-890e-4b16-93e5-943d6361f8b1.png)
   postman:
   ![image](https://user-images.githubusercontent.com/47098518/157162979-2ce24315-4317-4aff-a761-65b507844900.png)
   curl:
   ![image](https://user-images.githubusercontent.com/47098518/157163026-06cc675d-8d65-49e3-9061-84e465e57b97.png)
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):v2.8
   - OS (cmd: `uname -a`):centos7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   
   ### Steps to reproduce
   
   配置大致如下,能获取到后端响应:
   {
       "uri": "/test",
       "upstream": {           
               "name": "test",
               "id": "00000000000000182386",
               "timeout": {
                   "read": 6000,
                   "connect": 6000,
                   "send": 6000
               },
               "scheme": "http",
               "hash_on": "vars",
               "type": "roundrobin",
               "checks": {
                   "active": {
                       "healthy": {
                           "successes": 2,
                           "interval": 1,
                           "http_statuses": [200,302]
                       },
                       "timeout": 6,
                       "type": "http",
                       "unhealthy": {
                           "http_failures": 5,
                           "tcp_failures": 2,
                           "timeouts": 3,
                           "interval": 1,
                           "http_statuses": [429,404,500,501,502,503,504,505]
                       },
                       "req_headers": [
                           ""
                       ],
                       "concurrency": 10,
                       "http_path": "/test"
                   },
                   "passive": {
                       "healthy": {
                           "http_statuses": [200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],
                           "successes": 5
                       },
                       "type": "http",
                       "unhealthy": {
                           "timeouts": 7,
                           "http_statuses": [429,500,503],
                           "http_failures": 5,
                           "tcp_failures": 2
                       }
                   }
               },
               "pass_host": "pass",
               "nodes": {
                   "ip1:port1": 1,
                   "ip2:port2": 1
               }
        }
   }
   
   ### Actual result
   
   如上图描述
   
   ### Error log
   
   无错误日志
   
   ### Expected result
   
   能通过接口稳定获取健康检查结果


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



[GitHub] [apisix] leslie-tsang commented on issue #6540: bug: health check Sometimes there is data, sometimes there is no data

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6540:
URL: https://github.com/apache/apisix/issues/6540#issuecomment-1061487647


   > > 似乎与#5953相同,您能否提供更多有关如何重现它的详细信息?
   > 
   > 不知您说的更多如何重现它的详细信息指的是什么?没有特殊的配置,正常配置路由,在upstream上开启健康检查,并使用以上我所描述的方式访问就可复现。我当前是部署在18核32G的机器上测试使用,我猜测多worker下运行apisix可能更容易复现,您可以试一下,我认为很容易重现这种情况。
   
   Thanks for your valuable reply, I will try to reproduce it.


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



[GitHub] [apisix] leslie-tsang commented on issue #6540: bug: health check Sometimes there is data, sometimes there is no data

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6540:
URL: https://github.com/apache/apisix/issues/6540#issuecomment-1061397668


   It seems same with https://github.com/apache/apisix/issues/5953, can you provide more detail of how to reproduce it?


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



[GitHub] [apisix] whioue commented on issue #6540: bug: health check Sometimes there is data, sometimes there is no data

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #6540:
URL: https://github.com/apache/apisix/issues/6540#issuecomment-1061403450


   > 似乎与#5953相同,您能否提供更多有关如何重现它的详细信息?
   
   不知您说的更多如何重现它的详细信息指的是什么?没有特殊的配置,正常配置路由,在upstream上开启健康检查,并使用以上我所描述的方式访问就可复现。我当前是部署在18核32G的机器上测试使用,我猜测多worker下运行apisix可能更容易复现,您可以试一下,我认为很容易重现这种情况。


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



[GitHub] [apisix] whioue commented on issue #6540: bug: health check Sometimes there is data, sometimes there is no data

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #6540:
URL: https://github.com/apache/apisix/issues/6540#issuecomment-1061490824


   > > > 似乎与#5953相同,您能否提供更多有关如何重现它的详细信息?
   > > 
   > > 
   > > 不知您说的更多如何重现它的详细信息指的是什么?没有特殊的配置,正常配置路由,在upstream上开启健康检查,并使用以上我所描述的方式访问就可复现。我当前是部署在18核32G的机器上测试使用,我猜测多worker下运行apisix可能更容易复现,您可以试一下,我认为很容易重现这种情况。
   > 
   > Thanks for your valuable reply, I will try to reproduce it.
   
   我刚刚再次复现,可以把nginx.conf中的worker_processes设置稍微多一些,然后现象比较明显,应该是有的进程没有参与转发,因此查询健康检查的时候有的worker中没有存储健康检查数据?愚见仅供参考,希望修改此问题,谢谢。


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