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

bug: limit-count #11774

Open
jeremy1392 opened this issue Nov 21, 2024 · 0 comments
Open

bug: limit-count #11774

jeremy1392 opened this issue Nov 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jeremy1392
Copy link

jeremy1392 commented Nov 21, 2024

Current Behavior

I try to apply limit-count with redis to limit the API rate per consumers.
My redis server works well.

limit-count info:

count: 1000
time_window: 1000
key_type: var
key: consumer_name
rejected_code: 503
rejected_msg: API limit exceeds
policy: redis
allow_degradation: false
show_limit_quota_header: true
redis_host: redis.XXXX.XX
redis_port: 6379
redis_password: XXXXXX
redis_database: 0
redis_timeout: 1000

The 1st bug: it applies limit on routes and not on global and consumer_name is not working.
image

The 2nd bug: after some times, the plugin crashes:

Expected Behavior

API rate at consumer_name level.
If I have 30 routes and 1 consumer with API rate limiting of 1000.
I expect to have those 3000 requests split across routes.

Error Logs

2024/11/21 20:37:20 [warn] 57#57: 8 [lua] plugin.lua:954: decrypt_conf(): failed to get schema for plugin: limit-count, context: init_worker_by_lua

Steps to Reproduce

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e9dd32464ac9 apache/apisix:latest "/docker-entrypoint.…" 57 minutes ago Up 2 minutes 0.0.0.0:32936->9080/tcp, :::32936->9080/tcp, 0.0.0.0:32935->9091/tcp, :::32935->9091/tcp, 0.0.0.0:32934->9092/tcp, :::32934->9092/tcp, 0.0.0.0:32933->9180/tcp, :::32933->9180/tcp, 0.0.0.0:32932->9443/tcp, :::32932->9443/tcp root_apisix_1
633a442adcf6 nginx:alpine "/docker-entrypoint.…" 6 weeks ago Up 6 weeks 0.0.0.0:80->80/tcp, :::80->80/tcp loadbalancer
d0b2957d213a apache/apisix-dashboard:3.0.0-alpine "/usr/local/apisix-d…" 6 weeks ago Up 6 weeks 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp apisix-dashboard
b9fe507b91d2 prom/prometheus:v2.25.0 "/bin/prometheus --c…" 6 weeks ago Up 6 weeks 9090/tcp prometheus
93afedfafa73 grafana/grafana:latest "/run.sh" 6 weeks ago Up 6 weeks 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana
1eb17a543ca0 bitnami/etcd:3.5.11 "/opt/bitnami/script…" 6 weeks ago Up 6 weeks 0.0.0.0:2379->2379/tcp, :::2379->2379/tcp, 2380/tcp etcd
8538722a1a75 grafana/loki:latest "/usr/bin/loki -conf…" 6 weeks ago Up 6 weeks 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp loki

Environment

@dosubot dosubot bot added the bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant