LiteSpeed not honoring my optimistic locking setting

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

  1. dirkbj

    dirkbj Member

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


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

    Any thoughts? ;)

  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 Member

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


Share This Page