LSWS Rails App MySQL Connection Errors

Discussion in 'Ruby/Rails' started by malffred, Aug 30, 2009.

  1. mistwang

    mistwang LiteSpeed Staff

    Rails developers keep changing the API, I do not know exactly which function to use. :(

    ActiveRecord::Base.clear_all_connections! is a delegation to
  2. Grzegorz Derebecki

    Grzegorz Derebecki Well-Known Member

    you can allways check if activerecord respond_to :)

    ActiveRecord::Base.clear_all_connections! if ActiveRecord::Base.respond_to?:)clear_all_connections!)

  3. mistwang

    mistwang LiteSpeed Staff

    Thanks for the tip.

    The problem is that we need to keep the script compatible with all Rails versions. One API function may appear/disappear from version to version. It may work for one version, then stopped for next. Very hard to maintain.
  4. Grzegorz Derebecki

    Grzegorz Derebecki Well-Known Member

    i know that :) by the way litespeed supports multithread for rails (not fork)?
  5. mistwang

    mistwang LiteSpeed Staff

    No, prefork only.
    LSAPI itself can work with multi-thread, but it is not widely used/tested.
    Ruby support true multi-thread now? not just software simulated fake multi-thread?

Share This Page