LiteSpeed not honoring my optimistic locking setting

Discussion in 'Ruby/Rails' started by dirkbj, Apr 19, 2007.

  1. dirkbj

    dirkbj New Member

    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
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. dirkbj

    dirkbj New Member

    OK... that makes sense. That would be why.

    Dirk

Share This Page