Emitir com o mod proxy do apache, ele pára as solicitações de proxy após uma reinicialização normal, mas não o tempo todo.
Parece acontecer apenas em um domingo, quando uma reinicialização forçada é ativada pelo logrotate.
[Sun Sep 9 05:25:06 2012] [notice] SIGUSR1 received. Doing graceful restart
[Sun Sep 9 05:25:06 2012] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/3.0.11 configured -- resuming normal operations
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(492) failed in child 26153 for worker proxy:reverse
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(486) failed in child 26153 for worker http://api.myservice.org/api
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(487) failed in child 26153 for worker http://api.myservice.org/editor/$1
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(489) failed in child 26153 for worker http://api.myservice.org/build
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(490) failed in child 26153 for worker http://api.myservice.org/help
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(491) failed in child 26153 for worker http://api.myservice.org/motd.html
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(480) failed in child 26153 for worker http://api.myservice.org/api
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(481) failed in child 26153 for worker http://api.myservice.org/editor/$1
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(483) failed in child 26153 for worker http://api.myservice.org/build
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(484) failed in child 26153 for worker http://api.myservice.org/help
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(485) failed in child 26153 for worker http://api.myservice.org/motd.html
[Sun Sep 9 05:25:06 2012] [error] proxy: ap_get_scoreboard_lb(479) failed in child 26153 for worker http://api.myservice.org/motd.html
Após essas linhas, os logs são inundados com 404s porque as solicitações não estão sendo intermediadas por proxy.
Vale a pena notar que o destino é apenas outro vhost na mesma instância do apache, mas o vhost ( link ) está atendendo o passageiro (mod_rails)
Eu estava pensando que talvez haja alguns problemas de inicialização com os funcionários de passageiros que não estão prontos durante uma reinicialização normal?
Depois de um reinício completo, resolve-o e tudo volta ao normal.
// Editar
Aqui está a configuração vhost, obrigado :)
<VirtualHost *:80>
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
<Directory /var/www/vhosts>
RewriteEngine on
AllowOverride All
</Directory>
RewriteEngine on
RewriteCond /var/www/vhosts/%{SERVER_NAME} !-d
RewriteCond /var/www/vhosts/%{SERVER_NAME} !-l
RewriteRule ^ http://sitenotfound.myservice.org/ [R=302,L]
VirtualDocumentRoot /var/www/vhosts/%0/current
# Rewrite requests to /assets to map to the /var/file-store/<SERVER_NAME>/
RewriteMap lowercase int:tolower
RewriteCond %{REQUEST_URI} ^/assets/
RewriteRule ^/assets/(.*)$ /var/file-store/${lowercase:%{SERVER_NAME}}/$1
# Map /login to /editor.html as it's far friendlier.
RewriteCond %{REQUEST_URI} ^/login
RewriteRule .* /editor.html [PT]
# Forward some requests to the API
ProxyPass /api http://api.myservice.org/api
ProxyPass /site.json http://api.myservice.org/api/editor/site
ProxyPassMatch ^/editor/(.*)$ http://api.myservice.org/editor/$1
ProxyPassMatch ^/api/(.*) http://api.myservice.org/api/$1
ProxyPass /build http://api.myservice.org/build
ProxyPass /help http://api.myservice.org/help
ProxyPass /motd.html http://api.myservice.org/motd.html
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
# TODO generate slightly more specific Error Documents for 401/403/500's,
# but for now the 404 page is good enough
ErrorDocument 401 /404.html
ErrorDocument 403 /404.html
ErrorDocument 404 /404.html
ErrorDocument 500 /404.html
</VirtualHost>