LiteSpeed not honoring my optimistic locking setting

#1
When I launch my rails app under WEBrick, my connection to FrontBase is optimistic, as specified in config/environment.rb:

ActiveRecord::Base::connection.set_optimistic_transactions

However, when I launch under LiteSpeed, and it connects to the database, this setting is ignored and it is always pessimistic.

Any thoughts? ;)

Dirk
 

mistwang

LiteSpeed Staff
#2
Please verify that WEBrick is started in production mode if LiteSpeed is in production mode. LiteSpeed will not touch connection properties.

However, for technical reason, LSAPI closes all ActiveRecord connections after Rails framework initialization before forking a child process, and the connection will be re-established when a child process processes a request. If this option get lost when the connection was closed/re-established, you need to set it again.
 
Top