我在Rails 2.3.2上有小應用,使用nginx + thin(127)。 OS FreeBSD 7.1,DB - Posgresql。Rails和ip-spoofing
Twise在本週我的應用程序已經下降。 在日誌中我得到這樣的(〜每秒2-50請求):
/!\ FAILSAFE /!\ Mon Oct 04 20:13:55 +0300 2010
Status: 500 Internal Server Error
bad content body
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/utils.rb:311:in `parse_multipart'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/request.rb:125:in `POST'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/request.rb:428:in `request_parameters'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/request.rb:381:in `parameters'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:1279:in `assign_shortcuts'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:518:in `process_without_filters'
或者:!
/\保險/ \週二09年11月9時24分39秒+0200 2010 狀態:500內部服務器錯誤 IP欺騙攻擊? HTTP_CLIENT_IP = 「XX.XX.XX.XX」 HTTP_X_FORWARDED_FOR = 「192.168.XX.XX,YY.YY.YY.YY」
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/request.rb:229:in `remote_ip'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:1372:in `request_origin'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:1304:in `log_processing_for_request_id'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:1296:in `log_processing'
/usr/home/../../history/vendor/rails/actionpack/lib/action_controller/base.rb:522:in `process_without_filters'
之後,系統掌握到最大打開文件限制(我猜由postgesql會話打開),postgresql無法建立新的連接和應用程序下降。
任何建議,我怎麼能保護我的 ss pp在這種情況下?