Note that there are some explanatory texts on larger screens.

plurals
  1. POuwsgi : why two processes are loaded per each app?
    primarykey
    data
    text
    <pre><code>root@www:~# ps aux | grep uwsgi root 4660 0.0 0.0 10620 892 pts/1 S+ 19:13 0:00 grep --color=auto uwsgi root 19372 0.0 0.6 51228 6628 ? Ss 06:41 0:03 uwsgi --master --die-on-term --emperor /var/www/*/uwsgi.ini root 19373 0.0 0.1 40420 1292 ? S 06:41 0:03 uwsgi --master --die-on-term --emperor /var/www/*/uwsgi.ini www-data 19374 0.0 1.9 82640 20236 ? S 06:41 0:03 /usr/local/bin uwsgi --ini /var/www/app2/uwsgi.ini www-data 19375 0.0 2.4 95676 25324 ? S 06:41 0:03 /usr/local/bin uwsgi --ini /var/www/app3/uwsgi.ini www-data 19385 0.0 2.1 90772 22248 ? S 06:41 0:03 /usr/local/bin uwsgi --ini /var/www/app2/uwsgi.ini www-data 19389 0.0 2.0 95676 21244 ? S 06:41 0:00 /usr/local/bin uwsgi --ini /var/www/app3/uwsgi.ini </code></pre> <p>above is <code>ps</code> output of uwsgi processes. Strange thing is that for each ini files there are two instances loaded - even I have two uwsgi masters. is this normal?</p> <p>the deployment strategy for uwsgi is </p> <ul> <li>have Emperor managed by upstart</li> <li>Emperor searches for each <code>uwsgi.ini</code> in apps folder</li> </ul> <p><strong>uwsgi.conf</strong> for upstart:</p> <pre><code># simple uWSGI script description "uwsgi tiny instance" start on runlevel [2345] stop on runlevel [06] exec uwsgi --master --die-on-term --emperor "/var/www/*/uwsgi.ini" </code></pre> <p><strong>uwsgi.ini</strong>(I have two apps, and both apps have same ini except app# numbering):</p> <pre><code>[uwsgi] # variables uid = www-data gid = www-data projectname = myproject projectdomain = www.myproject.com base = /var/www/app2 # config enable-threads protocol = uwsgi venv = %(base)/ pythonpath = %(base)/ wsgi-file = %(base)/app.wsgi socket = /tmp/%(projectdomain).sock logto = %(base)/logs/uwsgi.log </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload