Search code examples
apacheproxyreverse-proxyvarnishpound

Pound + Varnish + Apache - Pound hanging


I have an issue with my current configuration.

I'm trying to stress test my platform prior to going live and I found something pretty concerning.

Pound conf:

User "pound"
Group "pound"
Control "/var/lib/pound/pound.cfg"
#TimeOut     150
LogLevel 3
LogFacility local1
ListenHTTP
    Address 0.0.0.0
    Port    80
    xHTTP    0
    Service
        BackEnd
            Address 127.0.0.1
            Port    9080
        End
    End
End
ListenHTTPS
    HeadRemove "X-Forwarded-Proto"
    AddHeader "X-Forwarded-Proto: https"
    Address 0.0.0.0
    Port    443
    Cert    "/etc/httpd/ssl/pound.pem"
    xHTTP       0
    Service
        BackEnd
            Address 127.0.0.1
            Port    9443
        End
    End
End

Varnish conf:

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

backend default_ssl {
  .host = "127.0.0.1";
  .port = "8443";
}

And then Apache listening 8080 and 8443.

The problem is that after 20 RPS, my pound hang (top shown no problem whatsoever), and I can get the page if I access the ip:8080 directly as well as ip:9080 meaning both the Varnish and Apache are fine.

As soon as I kill my stressing test machine, the page load.

The only relevant logs I have found are xx SessionClose c timeout popping everywhere in Varnishlog.

I tried to get rid of the pound using Google Cloud HTTP/HTTPS load balancer, but haven't succeeded to make it work with HTTPS.


Solution

  • If found the culprit!

    Threads xxx (Default 128)

    I set it to 4096, no problems anymore.