load balancing with Apache
Hi all - I'm setting up Galaxy under Apache and following the guide for a production environment. I've got the proxy server running properly and am now setting up load balancing. I currently start galaxy (for testing) using 'sh run.sh --reload' so I can stop galaxy using Ctrl-C. I'm following the instructions on http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Web%20Application%20Scali... There is a mistake in the run.sh script provided for Starting and Stopping the web app and runner services. The script right now shows: cd `dirname $0` for i in {0..1}; do python ./scripts/paster.py serve universe_wsgi.webapp.ini --server-name=web$i --pid-file=web$i.pid --log-file=web$i.log $@ done python ./scripts/paster.py serve universe_wsgi.runner.ini --server-name=runner0 --pid-file=runner0.pid --log-file=runner0.log $@ The problem with this is the python processes don't get backgrounded. So when this is run, the first web0 python process is invoked, but that's it. The rest doesn't get run. You need to stop the process with Ctrl-C, but then only the next web1 process gets started. Ctrl-C then stops web1, then runner0 gets started. I changed the script to be: cd `dirname $0` for i in {0..1}; do python ./scripts/paster.py serve universe_wsgi.webapp.ini --server-name=web$i --pid-file=web$i.pid --log-file=web$i.log --daemon $@ done python ./scripts/paster.py serve universe_wsgi.runner.ini --server-name=runner0 --pid-file=runner0.pid --log-file=runner0.log --daemon $@ I added '--daemon'. The only hiccup to this is after doing this, Ctrl-C is no longer an option to stop galaxy. So I discovered using 'sh run.sh --reload' is no longer correct. Instead 'sh run.sh --daemon' and 'sh run.sh --stop-daemon' should be used. This may want to be included in the wiki docs.
On Jan 3, 2012, at 1:19 PM, Ryan wrote:
Hi all - I'm setting up Galaxy under Apache and following the guide for a production environment. I've got the proxy server running properly and am now setting up load balancing. I currently start galaxy (for testing) using 'sh run.sh --reload' so I can stop galaxy using Ctrl-C.
I'm following the instructions on http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Web%20Application%20Scali...
There is a mistake in the run.sh script provided for Starting and Stopping the web app and runner services. The script right now shows:
cd `dirname $0` for i in {0..1}; do python ./scripts/paster.py serve universe_wsgi.webapp.ini --server-name=web$i --pid-file=web$i.pid --log-file=web$i.log $@ done python ./scripts/paster.py serve universe_wsgi.runner.ini --server-name=runner0 --pid-file=runner0.pid --log-file=runner0.log $@
The problem with this is the python processes don't get backgrounded. So when this is run, the first web0 python process is invoked, but that's it. The rest doesn't get run. You need to stop the process with Ctrl-C, but then only the next web1 process gets started. Ctrl-C then stops web1, then runner0 gets started.
I changed the script to be:
cd `dirname $0` for i in {0..1}; do python ./scripts/paster.py serve universe_wsgi.webapp.ini --server-name=web$i --pid-file=web$i.pid --log-file=web$i.log --daemon $@ done python ./scripts/paster.py serve universe_wsgi.runner.ini --server-name=runner0 --pid-file=runner0.pid --log-file=runner0.log --daemon $@
I added '--daemon'. The only hiccup to this is after doing this, Ctrl-C is no longer an option to stop galaxy. So I discovered using 'sh run.sh --reload' is no longer correct. Instead 'sh run.sh --daemon' and 'sh run.sh --stop-daemon' should be used. This may want to be included in the wiki docs.
Hi Ryan, Thanks for catching this, I've updated the documentation. --nate
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
participants (2)
-
Nate Coraor
-
Ryan