Skip to content

Instantly share code, notes, and snippets.

@hiratara
Created March 25, 2010 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiratara/343369 to your computer and use it in GitHub Desktop.
Save hiratara/343369 to your computer and use it in GitHub Desktop.
My bad configuration of mod_proxy and Starman
% starman --listen :21081 www/index.psgi
でStarmanを起動しておくと、
% ab -c 5 -n 500 http://127.0.0.1:21082/
を10回くらいやると、ひっかかるリクエストが出てレスポンスが極端に悪くなる。
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 4
95% 1008
98% 1994
99% 2003
100% 2020 (longest request)
% starman --workers 10 --listen :21081 www/index.psgi
とすると、問題なし。
LoadModule proxy_module /usr/libexec/apache2/mod_proxy.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
ServerRoot /tmp/test_proxy
PidFile logs/httpd.pid
LockFile logs/accept.lock
Listen 21082
DocumentRoot /tmp/test_proxy/www
ProxyPass / http://127.0.0.1:21081/
# % httpd -l
# Compiled in modules:
# core.c
# prefork.c
# http_core.c
# mod_so.c
sub { [200, [
'Content-Type' => 'text/plain',
'Content-Length' => '6',
], ["HELLO\n"] ] };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment