Topic: My server keeps crashing

My site is formerly a PHP application. Spammers loved to post comments on it.  Now that I'm on rails and have a better setup the spammers can't get through, but that doesn't stop them from trying.  On occasion my rails app can't handle the requests and crashes.  Can somebody help me figure this out?  Here is the production log just before the crash:

Processing Base#index (for 62.206.85.61 at 2006-09-06 07:35:55) [POST]
  Session ID: b145efed009378482bafb5fdcfee6b56
  Parameters: {"comment_subject"=>"plus size swimwear", "submit"=>"Submit comment\r\n\r\n", "comment_name"=>"swimwear", "comment_text"=>"<a href=http://www.geocities.com/bastevertu/plus-size-swimwear.html>plus size swimwear</a>  plus size swimwear", "comment_email"=>"swimwear-size@plus.com", "store_id"=>"2"}


ActionController::RoutingError (Recognition failed for "/comment2.php"):
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:522:in `recognition_failed'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:512:in `recognize!'
    /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request'
    /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!'
    /usr/lib/ruby/1.8/fcgi.rb:600:in `each_cgi'
    /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
    /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!'
    /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!'
    /var/www/buyindie/public/dispatch.fcgi:24


Is there some way I should route all .php requests back to / or something?  I'm pretty sure I'm using the latest gems.

Re: My server keeps crashing

If you wanted to fix the 404 errors (Routing errors) I think your .htaccess file would be the best place.  I'm not good enough with .htaccess code to come up with the right redirect script but I'm sure it wouldn't be more than three lines or so to route all php files to your site root.

Re: My server keeps crashing

I should mention that this is on lighttpd.  My impression is that .htaccess is only for Apache web servers.

Thanks,
Vince

Re: My server keeps crashing

This post might help you out.  If you search the page for 'redirect' you'll see some cool rules set up for doing redirects.