[Mongrel] Early morning strange error saying: Status: 500 Internal Server Error

Robert Vogel robert at kitchendemocracy.org
Fri Dec 15 12:15:10 EST 2006

I, too had a similar problem - which persisted even after I inserted

ActiveRecord::Base.verification_timeout = 14400

Into my config/production.rb

On close inspection of my apache logs I discovered that a robot was
hitting my application with a (near) simultaneous pair of get requests
with identical session_id's.  The session_id was new - and so both
rails processes attempted to insert a new record into the session
table, causing the database to report a duplicate key violation on the
second insert.

Apparently the second rails process determined that the session_id was
new before the first rails process had finished its insert.

Hope this is helpful.


More information about the Mongrel-users mailing list