# Backend down check when backend isn't down

**URL:** <https://discourse.haproxy.org/t/backend-down-check-when-backend-isnt-down/6563>\
**Category:** Help!\
**Created:** [May 13, 2021, 8:32am UTC](https://discourse.haproxy.org/t/backend-down-check-when-backend-isnt-down/6563 "2021-05-13T08:32:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonypd](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tonypd](https://discourse.haproxy.org/u/tonypd)\
**Post date:** [May 13, 2021, 8:32am UTC](https://discourse.haproxy.org/t/backend-down-check-when-backend-isnt-down/6563/1 "2021-05-13T08:32:39Z")

</div>

Hi community,

I’m starting to get at least once a day this errors…

[WARNING] 131/213634 (7) : Server mediawiki\_be\_https/mediawiki is DOWN, reason: Layer7 timeout, check duration: 10002ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.  
[ALERT] 131/213634 (7) : backend ‘mediawiki\_be\_https’ has no server available!  
[WARNING] 131/213744 (7) : Server mediawiki\_be\_https/mediawiki is UP, reason: Layer7 check passed, code: 200, check duration: 229ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.  
[WARNING] 131/213851 (7) : Server mediawiki\_be\_https/mediawiki is DOWN, reason: Layer7 timeout, check duration: 10001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.  
[ALERT] 131/213851 (7) : backend ‘mediawiki\_be\_https’ has no server available!  
[WARNING] 131/213956 (7) : Server mediawiki\_be\_https/mediawiki is UP, reason: Layer7 check passed, code: 200, check duration: 5850ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.  
[WARNING] 131/214107 (7) : Server mediawiki\_be\_https/mediawiki is DOWN, reason: Layer7 timeout, check duration: 10001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.  
[ALERT] 131/214107 (7) : backend ‘mediawiki\_be\_https’ has no server available!  
[WARNING] 131/214253 (7) : Server mediawiki\_be\_https/mediawiki is UP, reason: Layer7 check passed, code: 200, check duration: 6014ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.

i check if was a snapshot from veeam in that time to get timeout when vm is freezing but not coincidence to hour from backup so.. is weird.

haproxy is a container using: haproxy:2.3.0-alpine  
and mediawiki is another container in the same docker engine: bitnami/mediawiki:latest

my section backend for this is the follow:

global  
log stdout format raw local0  
daemon  
quiet  
tune.ssl.default-dh-param 2048  
ssl-default-bind-options no-sslv3 no-tls-tickets  
ssl-default-bind-ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:!DSS  
ssl-default-server-options no-sslv3 no-tls-tickets

defaults main

# never fail on address resolution

default-server init-addr libc,none resolvers docker\_resolver resolve-prefer ipv4  
mode http  
log global  
option httplog  
##option dontlognull  
option http-server-close  
option forwardfor except 127.0.0.0/8  
option redispatch  
option contstats  
retries 3  
timeout queue 1m  
timeout http-keep-alive 10s  
timeout check 10s  
timeout connect 10s  
timeout client 5m  
timeout server 5m  
maxconn 10000  
resolvers docker\_resolver  
nameserver dns 127.0.0.11:53

backend mediawiki\_be\_https  
mode http  
balance roundrobin  
option forwardfor  
option httpchk HEAD / HTTP/1.1\r\nHost:\ localhost

### email: set and send alerts

email-alert mailers mailer  
email-alert from “$DOCKER\_ENGINE\_NAME”.“$THIS\_CONTAINER\_NAME”@domain.tld  
email-alert to alerts.haproxy@domain.tld  
email-alert myhostname smtp1  
email-alert level info  
cookie SERVERID insert indirect nocache httponly secure  
server mediawiki mediawiki:8080 check inter 5s weight 50 id 1 cookie mediawiki\_

and on docker can see both up running for many days.

docker ps -a

**CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS** NAMES  
e8986ee5dcd4 bitnami/mediawiki:latest “/opt/bitnami/script…” 6 days ago Up 6 days 8080/tcp, 8443/tcp mediawiki  
f99a393d3b24 haproxy:2.3.0-alpine “/docker-entrypoint.…” 4 weeks ago Up 4 weeks 0.0.0.0:443-\>8443/tcp, 0.0.0.0:80-\>8080/tcp, haproxy

**messages on mail** :  
Server mediawiki\_be\_https/mediawiki is DOWN, reason: Layer7 timeout, check duration: 10001ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue

**and then after 2 min**  
Server mediawiki\_be\_https/mediawiki is UP, reason: Layer7 check passed, code: 200, check duration: 6014ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue

thanks in advance
