最近Pythonのプロダクトを扱っていたりします。 GunicornはRuby on Railsでよく使われているUnicornの影響を受けたと思われるプロダクトで、Gunicornは"Green Unicorn"という意味らしいです。 Unicornではよく知られてる手法としてkillによる再起動を使ってほぼ無停止でデプロイ後に再起動をかける手段があります。 Gunicornでも FAQ - How do I reload my application in Gunicorn? にあるように、以下のようなコマンドで再起動ができるそうです。 kill -HUP masterpid しかしながら、デプロイ時にsymbolic linkを入れ替えるという手法を取った場合にうまく動きません。そもそも、これってソースコードの編集に対応してないんじゃないかなっていう感じです。(検証しているときに書き
Recently, I wrote a simple web tracker at work, using the Bottle microframework. Looking back, maybe I should've used Flask instead, as I simply don't see the reason for stuffing 3,000 lines of code in one file, other than a proof of concept. But both frameworks are quite similar, and both have quite good documentation. A simple bottle app looks like this: from bottle import route, run @route('/')
簡単なアプリならPyramidで書けそうな感じにはなったので、次はDeploy周りについて調べてみた。 pipでインストールできるし定番っぽいところでGunicornの上で動かしたので手順をメモっておく。 インストール 新しいvirtualenv作ってそこにインストールしていく。 $ mkvirtualenv --distribute --no-site-packages --python=python2.7 gunicorn $ pip install pyramid gunicorn Pyramidアプリケーション生成 適当なディレクトリにscaffoldからpyramidアプリを作る。 $ mkdir dev $ cd dev $ paster create -t pyramid_starter sample $ cd sample $ python setup.py develop
I started to write pyramid applications 3 weeks ago, as a python and pyramid novice. Now the application goes to production. In the development process, many errors and problems happened to the application, although the pyramid documentation is very good, some latest changes are not included in the reference document. I wrote down the common problems I came across , and the solution I chose aga
Other Servers¶ There are popular servers written in Python that allow the execution of WSGI applications as well. Keep in mind though that some of these servers were written for very specific applications and might not work as well for standard WSGI application such as Flask powered ones. Tornado¶ Tornado is an open source version of the scalable, non-blocking web server and tools that power Frien
gunicornをdaemontoolsで死活監視したことあるか的な質問がどこかに流れていたので、手順を簡単にメモっておく。OSの環境は debian(leny)を例にとります。 gunicorn て何よ?、daemontoolsて何よ?って人はこちからどうぞ。 gunicornメモ - 偏った言語信者の垂れ流し Django アプリサーバ、gunicorn と fastcgi の比較 - Ian Lewis daemontools 1. daemontoolsのインストール よくネットで調べると「daemontools-installer」が出てくるけど、もう最近のでは無いというか普通にdaemontoolsだけでインストールできるようになってる。 sudo apt-get install daemontools daemontools-run 2. gunicorn のインストール お
nginx と gunicorn + meinheld を組み合わせた時のメモ。 nginx はリバースプロキシとして gunicorn に飛ばし、gunicorn の worker として meinheld を使った。 環境は Fedora13。 nginx は yum でインストール。 /etc/nginx/conf.d/virtual.conf に以下を追加。 Green Unicorn - Deployment にあるのをほぼそのまま。 upstream app_server { server unix:/var/run/gunicorn/gunicorn.sock fail_timeout=0; # For a TCP configuration: #server 192.168.1.2:8000 fail_timeout=0; } server { listen 80 defa
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy. Installation Here's a quick rundown on how to get started with Gunicorn. For more details read the documentation. $ pip install gunicorn $ cat myapp.py def app(environ,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く