On Thu, Nov 15, 2012 at 09:05:13AM -0500, Kyle Brandt wrote:
> With the configuration below, I see 4 proceses launched, but 2 of them seem
> to exit. Anyone know why this is? (When I try higher numbers of nbproc
> combined with higher bind-process I see more clones, but they still all
> exit so I only have 2 left)
> 
> -Kyle
> 
> [root@centos1 ~]# strace -f -e trace=process
> /opt/haproxy-ss-20121114/haproxy -f /etc/haproxy/haproxy.cfg
> execve("/opt/haproxy-ss-20121114/haproxy",
> ["/opt/haproxy-ss-20121114/haproxy", "-f", "/etc/haproxy/haproxy.cfg"], [/*
> 29 vars */]) = 0
> arch_prctl(ARCH_SET_FS, 0x7fde89bed7c0) = 0
> clone(Process 26733 attached
> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7fde89beda90) = 26733
> [pid 26732] clone(Process 26734 attached
> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7fde89beda90) = 26734
> [pid 26732] clone(Process 26735 attached
> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7fde89beda90) = 26735
> [pid 26732] clone(Process 26736 attached
> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7fde89beda90) = 26736
> [pid 26732] exit_group(0)               = ?
> [pid 26736] exit_group(0)               = ?
> Process 26736 detached
> [pid 26735] exit_group(0)               = ?
> Process 26735 detached
> 
> [root@centos1 ~]# ps aux | grep haproxy
> root     26733  0.0  0.2  52472  1052 ?        Ss   13:57   0:00
> /opt/haproxy-ss-20121114/haproxy -f /etc/haproxy/haproxy.cfg
> root     26734  0.0  0.2  52472  1052 ?        Ss   13:57   0:00
> /opt/haproxy-ss-20121114/haproxy -f /etc/haproxy/haproxy.cfg
> root     26753  0.0  0.1 103244   836 pts/1    S+   13:57   0:00 grep
> haproxy

When you have less processes than requested, it is because not all
of them have a frontend/backend bound to them.

> global
>   daemon
>   nbproc 4
> 
> defaults
>   clitimeout          10s
>   srvtimeout          10s
>   timeout connect     10s
> 
> listen ssl-front
>   bind-process 2-4
                 ^^^

And here is the cause above. bind-process does not accept ranges,
so you have to write "bind-process 2 3 4" instead. Here, only the
first number "2" was used. Interestingly, I recently got caught by
the exact same mistake. I think I should improve the parser to
support this form.

Regards,
Willy


Reply via email to