mikyll commented on issue #12268:
URL: https://github.com/apache/apisix/issues/12268#issuecomment-2919524950
I tried with this minimal example, and it works fine...
File `config.yaml`:
```yaml
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
```
File `apisix.yaml`:
```yaml
routes:
- uri: "/anything"
upstream:
nodes:
"httpbin.org": 1
- uri: "/api"
upstream:
nodes:
"httpbin.org": 1
# 1 second timeout (overrides default 60s)
timeout:
connect: 1
send: 1
read: 1
plugins:
proxy-rewrite:
uri: /delay/5
#END
```
Run with:
```bash
docker run --rm -it \
-v ./conf/config.yaml:/usr/local/apisix/conf/config.yaml \
-v ./conf/apisix.yaml:/usr/local/apisix/conf/apisix.yaml \
-p 9080:9080 \
apisix:latest
```
Test routes:
- Route with default timeout (60s) `/anything`:
```bash
$ curl localhost:9080/anything
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Host": "localhost",
"User-Agent": "curl/8.5.0",
"X-Amzn-Trace-Id": "Root=1-6838691d-7b3c765478707abb4d986629",
"X-Forwarded-Host": "localhost"
},
"json": null,
"method": "GET",
"origin": "10.0.2.100, X.X.X.X",
"url": "http://localhost/anything"
}
```
- Route with timeout (1 second) `/api`:
```bash
$ curl localhost:9080/api
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
<p><em>Powered by <a
href="https://apisix.apache.org/">APISIX</a>.</em></p></body>
</html>
```
---
Could you provide more configuration details?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]