Skip to content

help request: ai-proxy-multi health checker does not working #12838

@xuande

Description

@xuande

Description

When configuring multiple model service instances with ai-proxy-multi, the service throws 500 error and health checks fail to take effect if the first instance becomes unavailable.

[warn] 49#49: *79881097 [lua] openai-base.lua:231: failed to connect to LLM server: no route to host
[warn] 49#49: *79881097 [lua] plugin.lua:1199: common_phase(): ai-proxy-multi exits with http status code 500
{
  "total": 1,
  "list": [
    {
      "value": {
        "create_time": 1766491392,
        "name": "Qwen3-VL-30B-A3B-Instruct",
        "methods": [
          "POST"
        ],
        "update_time": 1766491392,
        "upstream": {
          "scheme": "http",
          "type": "roundrobin",
          "tls": {
            "verify": false
          },
          "nodes": [
            {
              "weight": 0,
              "priority": 0,
              "port": 80,
              "host": "127.0.0.1"
            }
          ],
          "pass_host": "pass",
          "hash_on": "vars"
        },
        "plugins": {
          "ai-proxy-multi": {
            "instances": [
              {
                "logging": {
                  "summaries": true
                },
                "priority": 1,
                "checks": {
                  "active": {
                    "type": "http",
                    "http_path": "/health",
                    "unhealthy": {
                      "http_failures": 3,
                      "interval": 1
                    },
                    "healthy": {
                      "successes": 1,
                      "interval": 2
                    },
                    "host": "192.168.1.30:10015"
                  }
                },
                "provider": "openai-compatible",
                "name": "Qwen3-VL-30B-A3B-Instruct",
                "override": {
                  "endpoint": "http://192.168.1.30:10015/v1/chat/completions"
                },
                "weight": 1,
                "auth": {
                  "header": {
                    "Authorization": "Bearer 019b4b55463c73bc81d3256c3df5a0c6"
                  }
                }
              },
              {
                "logging": {
                  "summaries": true
                },
                "priority": 1,
                "checks": {
                  "active": {
                    "type": "http",
                    "http_path": "/health",
                    "unhealthy": {
                      "http_failures": 3,
                      "interval": 1
                    },
                    "healthy": {
                      "successes": 1,
                      "interval": 2
                    },
                    "host": "192.168.1.31:10015"
                  }
                },
                "provider": "openai-compatible",
                "name": "Qwen3-VL-30B-A3B-Instruct",
                "override": {
                  "endpoint": "http://192.168.1.31:10015/v1/chat/completions"
                },
                "weight": 1,
                "auth": {
                  "header": {
                    "Authorization": "Bearer 019b4b55463c73bc81d3256c3df5a0c6"
                  }
                }
              }
            ]
          }
        },
        "uri": "/v1/chat/completions",
        "plugin_config_id": "global-plugin-config",
        "vars": [
          [
            "post_arg.model",
            "==",
            "Qwen3-VL-30B-A3B-Instruct"
          ]
        ],
        "id": "Qwen3-VL-30B-A3B-Instruct"
      },
      "key": "/apisix/routes/Qwen3-VL-30B-A3B-Instruct",
      "createdIndex": 116,
      "modifiedIndex": 116
    }
  ]
}

Environment

  • APISIX version (run apisix version): 3.14.1
  • Operating system (run uname -a): Ubuntu2204.5
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions