I’m opening a thread here because maybe someone else had this issue and solved it.
I started using railgun yesterday but I have a problem, when the traffic increases some of the requests fail with errors like this:
Mar 12 20:32:36 web07 rg-listener: [4b6889d5b89bc849-AMS] connection failed subdomain.example.com$188.8.131.52:443/subdomain.example.com: connect: cannot assign requested address
The more traffic I have, the more requests go in error, for example with about 1k requests per second, ~80 fail.
I installed railgun to the same server where all the application stack is.
Trying to fix the error, which I thought it could be a ports exhaustion, I configured nginx and my hosts file to be able to connect to the site over 443 locally to make the connections faster, now I can
ping smart.tubeadvertising.eu in ~0.02 ms and
curl works, but railgun doesn’t seem to respect that, because in the syslog and nginx log I see it still goes over the internet (I already restarted railgun).
In the nginx logs I see the requests coming with request_addr=“184.108.40.206”, which is the domain public ip, so the requests goes out from that interface to come back to the very same interface, it’s very non-optimal, how can I tell railgun to use the 220.127.116.11 interface?
in railgun.conf I set the server public hostname and ips (this .123 is the server main ip, that .123 is one of the other IPs attached to the server, basically traffic manager offers a SaaS to example, and every client has it’s dedicate IP)
activation.railgun_host = web07.example.com
activation.public_ip = 18.104.22.168