You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "zzl-code (via GitHub)" <gi...@apache.org> on 2024/09/12 09:19:09 UTC
[I] help request: how to close keepalive [apisix]
zzl-code opened a new issue, #11571:
URL: https://github.com/apache/apisix/issues/11571
### Description
Our request flow is from the browser to APISIX, then through the K8s service (svc) to the backend service. Occasionally, we encounter a 502 error with a probability of about 10%.


Upon checking the backend service, we found that it didn't receive the request, so we want to try disabling keepalive in APISIX to see if it resolves the issue. However, setting idle_timeout to 0 didn't seem to have any effect.

I noticed there's an enable_keepalive in the code; how should this be configured so that its value is false?

### Environment
- APISIX version (run `apisix version`): 3.9.1
- Operating system (run `uname -a`): Linux apisix-669fc8c449-pvncx 5.10.134-16.1.al8.x86_64 #1 SMP Thu Dec 7 14:11:24 UTC 2023 x86_64 GNU/Linux
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):openresty/1.25.3.1
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): bitnami/etcd:3.5.10-debian-11-r2
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how to close keepalive [apisix]
Posted by "zzl-code (via GitHub)" <gi...@apache.org>.
zzl-code commented on issue #11571:
URL: https://github.com/apache/apisix/issues/11571#issuecomment-2359783726
> > 我注意到代码中有一个 enable_keepalive;应如何配置它以使其值为 false?
>
> 读完代码后,我可以得出结论,这是无法配置的。但是,您可以修改代码并测试它是否解决了您的问题。然后您可以建议配置该`keepalive`字段。
>
> [您可以使用https://github.com/shreemaan-abhishek/apisix/blob/6e3bee2bffa97d03ba2ed7f33f92de9618acb94b/apisix/balancer.lua#L334](https://github.com/shreemaan-abhishek/apisix/blob/6e3bee2bffa97d03ba2ed7f33f92de9618acb94b/apisix/balancer.lua#L334)替换以下代码行`return true` [](https://github.com/shreemaan-abhishek/apisix/blob/6e3bee2bffa97d03ba2ed7f33f92de9618acb94b/apisix/balancer.lua#L334)
I modified the code to set enable_keepalive=false, observed it for a day, and it seems to have worked, as the 502 errors have not reappeared."
--
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
Re: [I] help request: how to close keepalive [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #11571:
URL: https://github.com/apache/apisix/issues/11571#issuecomment-2355077578
> I noticed there's an enable_keepalive in the code; how should this be configured so that its value is false?
after reading the code I can conclude that this cannot be configured. However, you may modify the code and test if it solved your issue. Then you may propose configuring the `keepalive` field.
You can replace the following line of code with `return true`
https://github.com/shreemaan-abhishek/apisix/blob/6e3bee2bffa97d03ba2ed7f33f92de9618acb94b/apisix/balancer.lua#L334
--
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
Re: [I] help request: how to close keepalive [apisix]
Posted by "zzl-code (via GitHub)" <gi...@apache.org>.
zzl-code closed issue #11571: help request: how to close keepalive
URL: https://github.com/apache/apisix/issues/11571
--
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
Re: [I] help request: how to close keepalive [apisix]
Posted by "JoniJnm (via GitHub)" <gi...@apache.org>.
JoniJnm commented on issue #11571:
URL: https://github.com/apache/apisix/issues/11571#issuecomment-2348603541
We have the same issue, using helm chart 2.8.1
--
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