stefanwerfling / flyingfish

FlyingFish is a reverse proxy manager with own WebUI, DNS server, SSH server, DynDNS, UPNP support, Lets Encrypt and much more.
https://flying-fish.gitbook.io/
GNU General Public License v3.0
45 stars 6 forks source link

Nginx internal connection - unix socket #69

Closed stefanwerfling closed 2 months ago

stefanwerfling commented 3 months ago

Check whether an internal connection via Unix socket is possible. Double check beforehand whether this has a performance advantage.

stefanwerfling commented 3 months ago

https://blog.myhro.info/2017/01/how-fast-are-unix-domain-sockets https://blog.davidsierra.dev/posts/connect-nginxs-through-sockets/

stefanwerfling commented 2 months ago

We have the problem that apparently only one server can bind to the Unix sock:

flyingfish_service   | {"level":"error","message":"NginxServer::stderr: 2024/04/12 09:05:07 [emerg] 19#19: bind() to unix:/opt/flyingfish/nginx/socks/127_0_0_1_10443.sock failed (98: Address already in use)","timestamp":"2024-04-12T09:05:08.858Z"}
flyingfish_service   | {"level":"error","message":"NginxServer::stderr: 2024/04/12 09:05:07 [emerg] 19#19: bind() to unix:/opt/flyingfish/nginx/socks/127_0_0_1_10080.sock failed (98: Address already in use)","timestamp":"2024-04-12T09:05:08.859Z"}
flyingfish_service   | {"level":"error","message":"NginxServer::stderr: 2024/04/12 09:05:07 [notice] 19#19: try again to bind() after 500ms","timestamp":"2024-04-12T09:05:08.860Z"}
flyingfish_service   | {"level":"error","message":"NginxServer::stderr: 2024/04/12 09:05:07 [emerg] 19#19: bind() to unix:/opt/flyingfish/nginx/socks/127_0_0_1_10443.sock failed (98: Address already in use)","timestamp":"2024-04-12T09:05:09.358Z"}
flyingfish_service   | {"level":"error","message":"NginxServer::stderr: 2024/04/12 09:05:07 [emerg] 19#19: bind() to unix:/opt/flyingfish/nginx/socks/127_0_0_1_10080.sock failed (98: Address already in use)","timestamp":"2024-04-12T09:05:09.359Z"}
stefanwerfling commented 2 months ago

Unfortunately we cannot list multi http servers on unix, so the ticket is no longer valid.