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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Ruby LSAPI warnings

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2007, 10:13 AM
Dan Kubb Dan Kubb is offline
New Member
 
Join Date: Feb 2007
Posts: 1
Default Ruby LSAPI warnings

I'm just tailing the stderr.log file and I get the following every few minutes appended to the logs:

==> ./stderr.log <==
/usr/lib64/ruby/1.8/test/unit/ui/console/testrunner.rb:108:in `flush': Broken pipe (Errno::EPIPE)
from /usr/lib64/ruby/1.8/test/unit/ui/console/testrunner.rb:108:in `output'
from /usr/lib64/ruby/1.8/test/unit/ui/console/testrunner.rb:51:in `setup_mediator'
from /usr/lib64/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start'
from /usr/lib64/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
from /usr/lib64/ruby/1.8/test/unit/autorunner.rb:200:in `run'
from /usr/lib64/ruby/1.8/test/unit/autorunner.rb:13:in `run'
from /usr/lib64/ruby/1.8/test/unit.rb:278
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:13

It was preceeded by the following one time, which makes me think it has something to do with when ruby processes are being shut down:

==> ./error.log <==
2007-02-05 09:38:10.095 [NOTICE] [Rails:onautopilot.com:/] stop worker processes

I also get the following warning whenever I restart LSWS:

==> ./stderr.log <==
/usr/lib64/ruby/gems/1.8/gems/ruby-lsapi-1.13/lib/lsapi.so: warning: already initialized constant ENV

Most of these are probably warnings, but I figured that I would mention them in case they were representative of larger underlying problems. At the very least if they were silenced when real errors do occur they would be easier to notice.
Reply With Quote
  #2  
Old 02-05-2007, 10:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
I think those are normal, ruby may dump some messages when it was stopped.

You will always get "warning: already initialized constant ENV" when ruby-lsapi was started.
Reply With Quote
  #3  
Old 02-11-2007, 05:28 AM
mabonyi mabonyi is offline
Member
 
Join Date: Sep 2006
Posts: 17
Default LSAPI warnings

At least for the ENV problem, I presume it appears because you are adding some LiteSpeed specific values to ENV. If you are doing this in Ruby, just wrap your constant resetting with this code:

old_verbose, $VERBOSE = $VERBOSE, nil
(set constant here)
$VERBOSE = old_verbose

It will prevent the warning from appearing. The equivalent in C should be pretty similar (other than the parallel assignment).
Reply With Quote
  #4  
Old 02-11-2007, 05:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Thanks for the suggestion.
We redefine ENV to a hash array instead of the standard char **environ, which should give better performance. It only happen once during LSAPI initialization.
I am not sure what you suggested works or not, will give it a try when I got a chance.
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 02:39 PM.



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