trying to troubleshoot an issue where 1 of the mongrel instances goes
haywire (99% CPU Util.) and i am forced to kill that PID and restart the
cluster.
I have found that I can reproduce the issue at will by calling my update
method (code below). When I tail the log file, I see the update kicking
off and it never completes. I don’t think there is anything special
about this code!!
I’ve also include my vhost config, as I’m not entirely sure that it is
correct. There seems to be a lot of different version/opinions on how
these should be set up.
Updated to the latest gems and at this point, I kinda outta ideas! This
is a joyent solaris box!
Hope somebody out there can help!
Thanks
@event = Event.find(params[:id])
approved = Status.find_by_name("Approved")
old_status = @event.status_id
new_status = params[:event][:status_id]
if @event.update_attributes(params[:event])
if (new_status == approved.id and new_status != old_status)
@event.approved_by_id = session[:user]
@event.save
end
end
<VirtualHost *:80>
ServerName www.mysite.com
ServerAlias mysite.com
DocumentRoot /var/www/apps/mysite/current/public
<Directory /var/www/apps/mysite/current/public/>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyRequests Off
ProxyPassReverse / http://127.0.0.1:9089/
ProxyPassReverse / http://127.0.0.1:9090/
ProxyPassReverse / http://127.0.0.1:9091/
ProxyPassReverse / http://127.0.0.1:9092/
ProxyPreserveHost on
<Proxy balancer://my_cluster>
BalancerMember http://127.0.0.1:9089
BalancerMember http://127.0.0.1:9090
BalancerMember http://127.0.0.1:9091
BalancerMember http://127.0.0.1:9092
</Proxy>
RewriteEngine On
# Prevent access to .svn directories
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteCond %{REQUEST_URI} !\.(css|jpg)$
RewriteRule ^.*$ http://www.mysite.com/system/maintenance.html
[L]
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://my_cluster%{REQUEST_URI}
[P,QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html