Re: POP server goes up and down

From: Rob Morin <rob#dido.ca>
Date: Tue, 20 Nov 2007 19:53:45 -0500


Here is my whole config....

Ahh, maybe its the default where it says option httplog ?? should i remove mode http from the default, i assumed whatever is in a listen block overrides the defaults...
I guess i assumed wrong?
as for version i compiled it from haproxy-1.3.13.1.tar.gz Yes i noticed just as i sent the first email.... as i had a problem with logging before....

I very much appreciate all your help!


global

        log 127.0.0.1   local0 notice
        maxconn 4096
        user haproxy
        group haproxy

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        redispatch
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

listen http_proxy xxx.xxx.xxx.148:80
       mode http
       log global
       stats enable
       stats auth dido:xxxxxxxxx
       balance roundrobin
       cookie JSESSIONID prefix
       option httpclose
       option forwardfor
       option httpchk HEAD /check.txt HTTP/1.0
       server peter xxx.xxx.xxx.158:80 cookie A check
       server joe xxx.xxx.xxx.149:80 cookie B check backup


### Setup for Mail

listen imap_proxy xxx.xxx.xxx.147:143

       maxconn 100
       mode tcp
       log global
       balance roundrobin
       server peter xxx.xxx.xxx.158:143 check inter 5000 fall 4 rise 1
       server joe xxx.xxx.xxx.149:143  check inter 5000 fall 4 rise 1
       stats enable

listen smtp_proxy xxx.xxx.xxx.147:25
       maxconn 500
       mode tcp
       log global
       balance roundrobin
       server peter xxx.xxx.xxx.158:25

       stats enable

listen pop_proxy xxx.xxx.xxx.147:110
        maxconn 500
        mode tcp
        log global
        balance roundrobin
        # client time-out set to 2mn30.
        clitimeout  150000
        # server time-out set to 30s.
        srvtimeout  30000
        contimeout  4000
       server peter xxx.xxx.xxx.158:110 check inter 5000 fall 4 rise 1
       server joe xxx.xxx.xxx.149:110  check inter 5000 fall 4 rise 1
       stats enable



Rob Morin
Dido Internet Inc.
Montreal,Canada
http://www.dido.ca
514-990-4444

Willy Tarreau wrote:

> On Tue, Nov 20, 2007 at 05:18:00PM -0500, Rob Morin wrote:
>   

>> Thanks for that help on the IPs
>>
>> so my config looks like this now...
>>
>> listen pop_proxy xxx.xxx.xxx.147:110
>> maxconn 500
>> mode tcp
>> log global
>> balance roundrobin
>>
>> # client time-out set to 2mn30.
>> clitimeout 150000
>>
>> # server time-out set to 30s.
>> srvtimeout 30000
>>
>
> You should set srvtimeout and clitimeout to identical values in order
> to reduce corner cases, especially in TCP mode.
>
>   

>> contimeout 4000
>>
>> server peter xxx..xxx.xxx.158:110 check inter 5000 fall 4 rise 1
>> server joe xxx.xxx.xxx149:110 check inter 5000 fall 4 rise 1
>> stats enable
>>
> > "stats enable" cannot work in TCP mode. I still wonder how this passed > through without any warning! > >

>> Also would i see any of these types of warnings or errors in the log file...
>>
>> my log file only shows notices....
>>
>> Nov 14 18:58:23 localhost haproxy[30724]: Server pop_proxy/peter is UP.
>> 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
>> Nov 14 19:05:49 localhost haproxy[30724]: Server pop_proxy/peter is
>> DOWN. 1 active and 0 backup servers left. 4 sessions active, 0 requeued,
>> 0 remaining in queue.
>> Nov 14 19:15:14 localhost haproxy[30724]: Server pop_proxy/peter is UP.
>> 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
>> Nov 14 19:25:54 localhost haproxy[30724]: Server pop_proxy/peter is
>> DOWN. 1 active and 0 backup servers left. 7 sessions active, 0 requeued,
>> 0 remaining in queue.
>> Nov 14 19:35:19 localhost haproxy[30724]: Server pop_proxy/peter is UP.
>> 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
>> Nov 14 19:44:55 localhost haproxy[30724]: Server pop_proxy/peter is
>> DOWN. 1 active and 0 backup servers left. 6 sessions active, 0 requeued,
>> 0 remaining in queue.
>>
>
> Have you noticed that the status changes almost exactly every 10 minutes ?
> This regularity is quite troublesome.
>
>   

>> Also i turned on info for abit for fun to see if it gave anymore details
>> i see stuff like this, but i assume its ok? :)
>>
>> Nov 20 09:47:20 localhost haproxy[27612]: 69.157.175.33:2689
>> [20/Nov/2007:09:47:20.330] pop_proxy pop_proxy/peter -1/1/0/-1/87 200 51
>> - - ---- 26/4/4/3 0/0 "<BADREQ>"
>> Nov 20 09:47:21 localhost haproxy[27612]: 206.248.146.170:59865
>> [20/Nov/2007:09:46:57.926] pop_proxy pop_proxy/peter -1/1/0/-1/23324 200
>> 55 - - ---- 28/3/3/2 0/0 "<BADREQ>"
>> Nov 20 09:47:24 localhost haproxy[27612]: 206.248.146.178:58851
>> [20/Nov/2007:09:47:24.306] pop_proxy pop_proxy/peter -1/1/0/-1/215 200
>> 54 - - ---- 27/5/5/2 0/0 "<BADREQ>"
>>
>
> It's abnormal, you have HTTP logs here while in TCP mode. What version of
> haproxy are you running ? This is what I consider a bug, but I'd like to
> know a bit more about the context. Also, would you happen to have any
> "defaults" section before your "listen" section ?
>
> Regards
> Willy
>
>   
Received on 2007/11/21 01:53

This archive was generated by hypermail 2.2.0 : 2007/11/21 02:30 CET