LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > LSWS Rails App MySQL Connection Errors

Reply
 
Thread Tools Display Modes
  #21  
Old 10-29-2009, 11:01 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Rails developers keep changing the API, I do not know exactly which function to use.

ActiveRecord::Base.clear_all_connections! is a delegation to
ActiveRecord::Base.connection_handler.clear_all_co nnections!
Reply With Quote
  #22  
Old 10-29-2009, 01:07 PM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Quote:
Originally Posted by mistwang View Post
Rails developers keep changing the API, I do not know exactly which function to use.

ActiveRecord::Base.clear_all_connections! is a delegation to
ActiveRecord::Base.connection_handler.clear_all_co nnections!
you can allways check if activerecord respond_to

ActiveRecord::Base.clear_all_connections! if ActiveRecord::Base.respond_to?(:clear_all_connecti ons!)

Reply With Quote
  #23  
Old 10-29-2009, 01:18 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #24  
Old 10-29-2009, 01:22 PM
Grzegorz Derebecki Grzegorz Derebecki is offline
Senior Member
 
Join Date: Jun 2007
Posts: 92
Quote:
Originally Posted by mistwang View Post
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.
i know that by the way litespeed supports multithread for rails (not fork)?
Reply With Quote
  #25  
Old 10-29-2009, 08:31 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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?
Reply With Quote
Reply

Tags
lsws, mysql, rails, ruby on rails

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:53 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.