title: running two instances of gunicorn
body: <p>Trying to run two sites on gunicorn editing the service from </p>
  
  <pre><code>[Unit]
  Description=gunicorn daemon
  After=network.target
  
  [Service]
  User=ubuntu
  Group=www-data
  WorkingDirectory=/home/ubuntu/webapps/kenyabuzz
  
  ExecStart=/home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>to</p>
  
  <pre><code>[Unit]
  Description=gunicorn daemon
  After=network.target
  
  [Service]
  User=ubuntu
  Group=www-data
  WorkingDirectory=/home/ubuntu/webapps/kenyabuzz
  WorkingDirectory=/home/ubuntu/webapps/uganda_buzz
  
  ExecStart=/home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
  ExecStart=/home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/uganda_buzz/ug.sock kb.wsgi:application
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>the logs shows the <code>ExecStart</code> can't be duplicated</p>
  
  <pre><code>ubuntu@ip-172-31-17-122:~$ sudo systemctl status gunicorn
  ● gunicorn.service - gunicorn daemon
     Loaded: error (Reason: Invalid argument)
     Active: active (running) since Tue 2017-02-14 09:36:52 EAT; 35s ago
   Main PID: 26150 (gunicorn)
     CGroup: /system.slice/gunicorn.service
             ├─26150 /home/ubuntu/webapps/djangoenv/bin/python /home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
             ├─26156 /home/ubuntu/webapps/djangoenv/bin/python /home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
             ├─26157 /home/ubuntu/webapps/djangoenv/bin/python /home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
             └─26160 /home/ubuntu/webapps/djangoenv/bin/python /home/ubuntu/webapps/djangoenv/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/webapps/kenyabuzz/kb.sock kb.wsgi:application
  
  Feb 14 09:36:52 ip-172-31-17-122 systemd[1]: Started gunicorn daemon.
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26150] [INFO] Starting gunicorn 19.6.0
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26150] [INFO] Listening at: unix:/home/ubuntu/webapps/kenyabuzz/kb.sock (26150)
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26150] [INFO] Using worker: sync
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26156] [INFO] Booting worker with pid: 26156
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26157] [INFO] Booting worker with pid: 26157
  Feb 14 09:36:52 ip-172-31-17-122 gunicorn[26150]: [2017-02-14 09:36:52 +0000] [26160] [INFO] Booting worker with pid: 26160
  Feb 14 09:37:15 ip-172-31-17-122 systemd[1]: gunicorn.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
  </code></pre>
  
  <p>what would be the best way to run two sites in this case, using the available configurations. Tried on the same line separated by space and comma each brings an error.</p>