Reputation: 2603
I've been struggling with this problem in my local environment for quite some time now. I've been looking everywhere trying many different solutions.
Setup: I create a backend in the config file that point on an external web site with no caching (pass).
Behavior: Randomly, the backend connection is closed with the message "Error 503 Service Unavailable".
I have a simple web page served by Amazon EC2. I use Varnish to redirect my calls. I hit F5 in my browser and sometime it works, sometime not. Using varnishlog, I've been trying to figure out what is hapenning: The only thing that make sense is the line where it says "BackendClose ". After that, all subsequent requests fails. (Also, I have other backend configured as well and it works fine.)
Also, I've been trying to play with the keep-alive/session length, but nothing works so far. From what I understand, it seems that the connection to the backend is closed (probably via amazon for some reason), but varnish wait some time before it restores it.
So, if anyone have some suggestions, I would be happy to try them.
Varnish version: varnish-3.0.2 revision cbf1284
Upvotes: 1
Views: 834
Reputation: 2603
after trying to figure out where the problem came from, I finally figure it out.
It seems that there was something that was blocking the ip for some reason. After checking for a firewall blocking randomly some packets and the different switch policies, I found out that the problem was because I had a second ethernet configuration for my machine. I don't know why it was there so I deleted it. Since then, the issue is gone.
So thanks to the network guys who helped me to fix that, because I was becoming insane :P In the end, it wasn't a Varnish issue. Next time, I'll try to do many different kind of tests on different machines and environment before loosing so much time in something like that.
Upvotes: 0