JiaYueHuang edited a comment on issue #6034:
URL: https://github.com/apache/apisix/issues/6034#issuecomment-1011055040
> > 1. Does the `stream_proxy` (tcp proxy) is a short connection?
>
> AFAIK, not short connection by default. pls show the stream proxy
configuration in `nginx.conf`.
>
> This error, from your description, APISIX disconnected connection? cc
@spacewander the stream proxy has timeout configuration in the upstream, I
think it has something to do with the timeout?
shown below:
```
stream {
lua_package_path
"$prefix/deps/share/lua/5.1/?.lua;$prefix/deps/share/lua/5.1/?/init.lua;/usr/local/apisix/?.lua;/usr/local/apisix/?/init.lua;;/usr/local/apisix/?.lua;./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib64/lua/5.1/?.lua;/usr/lib64/lua/5.1/?/init.lua;";
lua_package_cpath
"$prefix/deps/lib64/lua/5.1/?.so;$prefix/deps/lib/lua/5.1/?.so;;./?.so;/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/loadall.so;";
lua_socket_log_errors off;
lua_max_pending_timers 16384;
lua_max_running_timers 4096;
lua_shared_dict lrucache-lock-stream 10m;
lua_shared_dict plugin-limit-conn-stream 10m;
lua_shared_dict etcd-cluster-health-check-stream 10m;
resolver 8.8.8.8 114.114.114.114;
resolver_timeout 5;
# stream configuration snippet starts
# stream configuration snippet ends
upstream apisix_backend {
server 127.0.0.1:80;
balancer_by_lua_block {
apisix.stream_balancer_phase()
}
}
init_by_lua_block {
require "resty.core"
apisix = require("apisix")
local dns_resolver = { "8.8.8.8", "114.114.114.114", }
local args = {
dns_resolver = dns_resolver,
}
apisix.stream_init(args)
}
init_worker_by_lua_block {
apisix.stream_init_worker()
}
server {
listen xxx.xx.8.246:3306 reuseport;
listen xxx.xx.8.246:11211 reuseport;
preread_by_lua_block {
apisix.stream_preread_phase()
}
proxy_pass apisix_backend;
log_by_lua_block {
apisix.stream_log_phase()
}
}
}
```
--
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]