primospot
07-23-2007, 02:42 PM
I have a new rails app installed here on blue host and after much headache, I got the app running.
However, after some real testing, I noticed I kept getting the dreaded CPU usage error when my app was really getting used by more than one person at a time.
Anyway. Here was the fix:
1) follow the convoluted instructions on the forum post to get your app running (ssh access, rails first, subdomain, symblic link. etc)
2) make sure you are running production mode!
3) enable fastcgi in your .htacess file
edit the ~/public/.htaccess file and change the following line:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
to
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
( *note: the # sign below if just to show a command, not PART of the command )
4) test that this worked by temporarily renaming your dispatch.cgi file:
#mv dispatch.cgi dispatch.cgi.old
if your app still runs, then you are now using fcgi. rename the file back:
#mv dispatch.cgi.old dispatch.cgi
okay on to the next step.
5) edit the dispatch.fcgi file
change the line
RailsFCGIHandler.process!
to
RailsFCGIHandler.process! nil, 50
that did it for me. good luck!!!
-orff
However, after some real testing, I noticed I kept getting the dreaded CPU usage error when my app was really getting used by more than one person at a time.
Anyway. Here was the fix:
1) follow the convoluted instructions on the forum post to get your app running (ssh access, rails first, subdomain, symblic link. etc)
2) make sure you are running production mode!
3) enable fastcgi in your .htacess file
edit the ~/public/.htaccess file and change the following line:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
to
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
( *note: the # sign below if just to show a command, not PART of the command )
4) test that this worked by temporarily renaming your dispatch.cgi file:
#mv dispatch.cgi dispatch.cgi.old
if your app still runs, then you are now using fcgi. rename the file back:
#mv dispatch.cgi.old dispatch.cgi
okay on to the next step.
5) edit the dispatch.fcgi file
change the line
RailsFCGIHandler.process!
to
RailsFCGIHandler.process! nil, 50
that did it for me. good luck!!!
-orff