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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > LoadError with Rails

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2007, 08:11 PM
parra parra is offline
New Member
 
Join Date: Jun 2007
Posts: 2
Default LoadError with Rails

Hello,

I'm using LiteSpeed with Ruby on Rails, configured with LSAPI.
My Rails version is 1.2.3
I've this strange error:

A LoadError occurred in distro#index:

Expected config/../app/controllers/tj/tarefa.rb to define Tj::Tarefa
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:250:in `load_missing_constant'

The file is there and the error is intermitent.

After lots of tests, I found that it happens after some time of inativity...

The number of seconds of inativity is dependent of the value in LSAPI_MAX_IDLE.

If I set it to 100, and stay 110 seconds without accessing my application, it raises the error.... if I stay less than 100, it works perfectly....


Can someone figure why is this happening ???

Thanks in advance....


Parra
Reply With Quote
  #2  
Old 06-12-2007, 08:39 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Does the error happen when the next request comes in and causes the request to fail, or it happens when the children ruby process exit after "LSAPI_MAX_IDLE", just got a exception logged into the log file?

How about preload the those classes in your environment.rb?
Reply With Quote
  #3  
Old 06-13-2007, 11:01 AM
parra parra is offline
New Member
 
Join Date: Jun 2007
Posts: 2
Default Reply to Thread

Hello mistwang,

The error happen when the next request comes in and causes the request to fail.
I preloaded the class in enviroment.rb, and now it's working fine.

Just don't know why it hapens with LiteSpeed.... with Mongrel was working fine....

Thanks
Reply With Quote
  #4  
Old 06-13-2007, 12:28 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
ruby-lsapi fork children processes to handle requests. For some reasons, children ruby process has issues when it fork again, like calling popen(), etc. And I believe ruby has fork related bugs in its core library.
Reply With Quote
Reply

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 03:51 PM.



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