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
APISIX occasionally returns 500 for httpbin.org #1250
Comments
@sshniro please provide your error log when you got 500 responses code, I need to confirm it. I guess you are using an older version of Apache APISIX. I have fixed this error for a few days. You can make a try with the latest version of APISIX. |
@membphis , I'm using the master branch, There are no helpful messages printed when I get 500, This is what I get during startup. |
@membphis This is reproducible with the latest master branch, What does RLLIMIT mean in this context? |
If we can't find any associated error logs from the local file, then this 500 error response is from httpbin and it was not generated by APISIX. Your Nginx worker does not have permissions, which limits the number of open files. |
I tried your example, I got sucess $ curl "http://127.0.0.1:9080/apisix/admin/upstreams/50" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"type": "roundrobin",
"nodes": {
"httpbin.org:443": 1
}
}'
{"node":{"value":{"nodes":{"httpbin.org:443":1},"hash_on":"vars","type":"roundrobin"},"createdIndex":2103,"key":"\/apisix\/upstreams\/50","modifiedIndex":2103},"action":"set"}
$ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/samplePrefix/get",
"plugins": {
"proxy-rewrite": {
"scheme": "https",
"regex_uri": ["^/samplePrefix/get(.*)", "/get$1"]
}
},
"upstream_id": 50
}'
{"node":{"value":{"upstream_id":50,"plugins":{"proxy-rewrite":{"regex_uri":["^\/samplePrefix\/get(.*)","\/get$1"],"scheme":"https"}},"uri":"\/samplePrefix\/get","priority":0},"createdIndex":2104,"key":"\/apisix\/routes\/5","modifiedIndex":2104},"action":"set"}
$ curl -i -X GET http://127.0.0.1:9080/samplePrefix/get\?param1\=foo\¶m2\=bar
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 367
Connection: keep-alive
Date: Sat, 14 Mar 2020 13:42:50 GMT
Server: APISIX web server
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"args": {
"param1": "foo",
"param2": "bar"
},
"headers": {
"Accept": "*/*",
"Host": "127.0.0.1",
"User-Agent": "curl/7.66.0",
"X-Amzn-Trace-Id": "Root=1-5e6cdf59-6808716820e92f54dfa60584",
"X-Forwarded-Host": "127.0.0.1"
},
"origin": "127.0.0.1, 223.73.235.21",
"url": "https://127.0.0.1/get?param1=foo¶m2=bar"
} |
Thanks, Yes it was working but gave 500 intermittently, I will try with another service and get back to you. BTW, a suggestion why don't we host an echo service for APISIX itself? I see some of the docs use this IP |
@Akayeshmantha is working on this, you can talk to him directly. |
we should change it to another address. PR welcome |
Sure, will update! |
Issue description
For testing, I use httpbin.org as an upstream address to echo the parameters. But I'm starting to get 500 for consequent hits for the same address. And occasionally it returns 200 again, the behavior is unpredictable.
Does anyone know why is this happening? Is this something related to caching or timeouts?
I tested httpbin.org without proxying via APISIX with a 1-second loop and the response is always 200.
The following is the screenshot when I access
httpbin
via apisix with 1-second interval.The following is the screenshot when I access
httpbin
without any proxy with 1-second interval.The following is my configuration.
The text was updated successfully, but these errors were encountered: