Supervisord creating multiple instances

supervisord

[supervisord]
nodaemon=true

[program:haproxy]
command=service haproxy start
numprocs=1
autostart=true
autorestart=true

The conf file is creating four instances. Any ideas why this is happening?

root@haproxy:/etc/init.d# ps aux | grep haproxy
haproxy     18  0.0  1.1  39436  5760 ?        Ss   15:42   0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy     27  0.0  1.3  39572  6944 ?        Ss   15:42   0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy     36  0.0  1.1  39436  5768 ?        Ss   15:42   0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy     45  0.0  1.1  39436  5768 ?        Ss   15:42   0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root        69  0.0  0.1   8860   648 ?        S+   15:53   0:00 grep --color=auto haproxy

Best Answer

This was an issue regarding haproxy and it's .cfg file.

/run/haproxy directory did not exist and was needed due to this line in the haproxy.cfg file:

stats socket /run/haproxy/admin.sock mode 660 level admin