Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

health check can't use #1851

Closed
wanzhenhan opened this issue Jul 16, 2020 · 2 comments
Closed

health check can't use #1851

wanzhenhan opened this issue Jul 16, 2020 · 2 comments

Comments

@wanzhenhan
Copy link

wanzhenhan commented Jul 16, 2020

环境:
version: v1.4.0
路由和upstream配置:

curl -i --connect-timeout 1 http://127.0.0.1:9080/apisix/admin/routes/4444 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "methods": ["POST", "GET","DELETE"],
    "uri": "/xxxx/v1/readiness",
    "plugins": {
    },
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "10.82.4.112:10188": 1,
            "10.82.4.112:10190": 1
        },
        "checks": {
            "active": {
                "http_path": "/xxxx/v1/liveness",
                "host": "health.com",
                "healthy": {
                    "interval": 4,
                    "successes": 1
                },
                "unhealthy": {
                    "interval": 5,
                    "http_failures": 1
                }
            }
        }
    }
}'

当客户端发起访问时,报如下错误:
failed to run balancer_by_lua*: /usr/local/openresty/lualib/resty/lock.lua:153: API disabled in the context of balancer_by_lua*

@membphis
Copy link
Member

membphis commented Jul 17, 2020

Is it an inevitable bug, or does it happen occasionally?

Do you have a way to reproduce this bug stably?

@membphis
Copy link
Member

membphis commented Aug 6, 2020

@wanzhenhan please make a try with this PR: #1971

I think this bug has been fixed.

spacewander added a commit to spacewander/incubator-apisix that referenced this issue Jan 11, 2021
Allow to call yield function in the healthcheck.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Co-authored-by: YuanSheng Wang <membphis@gmail.com>

Fix apache#1851
Fix apache#2842

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Jan 11, 2021
Allow to call yield function in the healthcheck.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Co-authored-by: YuanSheng Wang <membphis@gmail.com>

Fix apache#1851
Fix apache#2842

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
sysulq pushed a commit to sysulq/apisix that referenced this issue Jan 15, 2021
Allow to call yield function in the healthcheck.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Co-authored-by: YuanSheng Wang <membphis@gmail.com>

Fix apache#1851
Fix apache#2842
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants