Any idea whats the difference between the two commands below?
Command: manage.py runfcgi method=threaded host=127.0.0.1 port=3033
labs@li68:/var/www/django_projects/myproject$ ps aux|grep manage.py
labs 14558 0.0 2.2 65948 8212 ? Sl Oct19 0:09 python /var/www/django_projects/myproject/manage.py runfcgi method=threaded host=127.0.0.1 port=3033
Command: python manage.py runfcgi host=127.0.0.1 port=7021 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs@li68:/var/www/django_projects/myproject$ ps aux|grep manage.py
labs 21082 0.0 2.8 15440 10472 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs 21083 0.0 2.7 15440 10084 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs 21084 0.0 2.7 15440 10084 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs 21085 0.0 2.7 15440 10084 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs 21086 0.0 2.7 15440 10084 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
labs 21087 0.0 2.7 15440 10084 ? S 22:27 0:00 python manage.py runfcgi host=127.0.0.1 port=3034 protocol=fcgi pidfile=/tmp/myproject.fcgi.pid
The second command looks like it spawns 6 processes, with memory allocated to each one.
- What would be the best option if you do not have a lot of memory? and running several django instances?
- Why does the second command spawn 6 processes?
- What is the advantage/disadvantages of each approach?
- How do you limit the amount of processes spawned?