Problem installing LiteSpeed 2.2.1 Standard on UNIX

Discussion in 'Install/Configuration' started by perezsy, Sep 18, 2006.

  1. perezsy

    perezsy New Member

    Hello and sorry if my english is not always perfect,

    We are very interested in buying the Enterprise version of the server to serve our new Rails apps if it keeps it promises in terms of performance, scalability and deployment easiness of Rails apps.

    I decided then to download and have a look at the Standard edition.
    Here is the os/hardware I want to intall LiteSpeed Std on :
    Code:
    SunOS hulk3.bil.lu 5.8 Generic_117350-23 sun4u sparc SUNW,Sun-Fire-280R
    So I dowloaded the Solaris (SPARC) version, unpacked it in my home directory (since I'm not a super user) and ran :
    Code:
    ./install.sh
    Destination [~/lsws]: 
    User name [admin]: admin
    Password: 
    Retype password: 
    
    And then I got this :
    Code:
    ld.so.1: /globalhome2/eg818/lsws-2.2.1/admin/fcgi-bin/admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    But the install procedure continued and went ok till the end with the following inputs from my part :
    Code:
    Setup up PHP [Y/n]: Y
    Suffix for PHP script(comma separated list) [php]: 
    
    Installing, please wait... 
    
    Your current PHP engine /globalhome2/eg818/lsws/fcgi-bin/lsphp is renamed to lsphp.old
    
    Would you like to change PHP opcode cache setting [y/N]? N
    Would you like to install AWStats Add-on module [y/N]? N
    Would you like to import Apache configuration [y/N]? N
    Congratulations! The LiteSpeed Web Server has been successfully installed.
    Command line script - "/globalhome2/eg818/lsws/bin/lswsctrl"
    can be used to start or stop the server.
    
    I started the server and I managed to access the default site : http://hulk3:8088

    But when I tried the admin part : http://hulk3:7080 filling the login and password and clicking OK, then the browser gave me this :
    Code:
    503 Service Unavailable 
    The server is temporarily busy, try again later!
    --------------------------------------------------------------------------------
     Powered By LiteSpeed Web Server
    Lite Speed Technologies is not responsible for administration and contents of this web site! 
    Looking in the logs directory gives the following :
    error.log
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs > more error.log
    2006-09-18 14:53:53.492 [NOTICE] Loading LiteSpeed/2.2.1 Standard ...
    2006-09-18 14:53:53.601 [NOTICE] [ADMIN] server socket: 127.0.0.1:7316
    2006-09-18 14:53:53.601 [NOTICE] Loading configuration from /globalhome2/eg818/lsws/conf/httpd_config.xml ...
    2006-09-18 14:53:53.605 [NOTICE] [suEXEC] disabled, web server is not started by root user.
    2006-09-18 14:53:53.609 [INFO] old priority: 0, new priority: 0
    2006-09-18 14:53:53.609 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
    2006-09-18 14:53:53.635 [NOTICE] The maximum number of file descriptor limit is set to 1024.
    2006-09-18 14:53:53.644 [WARN] [config:server:rails] Cannot find ruby interpreter, Rails easy configuration is turned off
    2006-09-18 14:53:53.665 [NOTICE] [AutoRestarter] new child process with pid=4805 is forked!
    2006-09-18 14:53:53.667 [NOTICE] [Child: 4805] Setup swapping space...
    2006-09-18 14:53:53.667 [NOTICE] [Child: 4805] LiteSpeed/2.2.1 Standard starts successfully!
    2006-09-18 14:53:54.347 [NOTICE] [AutoUpdate] Checking for new releases...
    2006-09-18 14:54:14.414 [NOTICE] [AutoUpdate] Failed, updateagent exit code: 3
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs > 
    stderr.log
    Code:
    ld.so.1: admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    ld.so.1: admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    ld.so.1: admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    ld.so.1: admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    
    Did someone has an idea ? I am not a UNIX expert guru but I feel this may be a system problem...

    I have other questions :
    1) Why two directories : ~/lsws and ~/lsws-2.2.1 ?
    2) I installed Ruby version 1.8.4 in ~/ruby and added the ~/ruby/bin in my PATH, but it seems that LiteSpeed did not succeed in detecting my Ruby install.
    Code:
    2006-09-18 14:53:53.644 [WARN] [config:server:rails] Cannot find ruby interpreter, Rails easy configuration is turned off
    Anyone has an idea ? Is there a way to specify manually where the Ruby is installed ?

    Thanks in advance,

    PS : I must admin that I spent a couple of days trying to run Apache + FastCGI and gave up because of instability issues. So LiteSpeed is my last chance to convince my friends / developpers of the beauty of Ruby on Rails...
  2. mistwang

    mistwang LiteSpeed Staff

    We made a mistake when building admin_php binary, admin_php dynamically linked to libjpeg.so, we updated the binary with static linkage to libjpeg.a, you can download 2.2.1 package again, the problem should be fixed.

    ~/lsws-2.2.1 is where the installation package expanded, you can remove it after installation, ~/lsws is the directory where LSWS has been installed to.

    You can change the path to ruby executable after you get into the web admin console under "Rails" tab. If it is better to install ruby to server wide directory if you have the authority to do that.

    LiteSpeed + Rails is quick and easy, one of the best platform for RoR development and deployment. I hope you enjoy working on it. :)
  3. perezsy

    perezsy New Member

    Hi and thank you for your fast answer,

    I downloaded the install again deleted all the directories and tried to reinstall, but I have the same error message during the install :
    Code:
    Please specify the administrator's password.
    This is the password required to log into the administration web interface.
    
    Password: 
    Retype password: 
    ld.so.1: /globalhome2/eg818/lsws-2.2.1/admin/fcgi-bin/admin_php: fatal: libjpeg.so.62: open failed: No such file or directory
    Please choose the group that the web server running as.
    What looks strange is that the new install has the same filesize as the old one. Could you confirm that you changed the install file ?
  4. mistwang

    mistwang LiteSpeed Staff

    Sorry, made another mistake again.
    Fixed, please download the package again.
  5. perezsy

    perezsy New Member

    Work great !

    Thank you.

    One last thing : do you forsee in a near futur to provide a Windows version of your server ?
  6. mistwang

    mistwang LiteSpeed Staff

    It probably will not happen in the near future.
  7. perezsy

    perezsy New Member

    I was too optimistic...

    I managed to start view the "Youre riding the Rails!" page of a test application. But when I click on the link "About your applications environment" then the browser waits for ages and responds back :
    Code:
    503 Service Unavailable 
    The server is temporarily busy, try again later!
    --------------------------------------------------------------------------------
     Powered By LiteSpeed Web Server
    Lite Speed Technologies is not responsible for administration and contents of this web site! 
    
    Going in the server log directory I have this in the stderr.log file :
    Code:
    ld.so.1: ruby: fatal: relocation error: file /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/lsapi.so: symbol unsete
    nv: referenced symbol not found
    When I start an irb session and type :
    Code:
    require 'lsapi'
    I get this :
    Code:
    irb(main):001:0> require 'lsapi'
    /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/lsapi.so: warning: already initialized constant ENV
    ld.so.1: /globalhome2/eg818/ruby/bin/ruby: fatal: relocation error: file /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solari
    s2.8/lsapi.so: symbol getpeername: referenced symbol not found
    Killed
    
    I remember I had warning when I installed ruby-lsapi-1.8 :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8 > ruby setup.rb config
    ---> ext
    ---> ext/lsapi
    /globalhome2/eg818/ruby/bin/ruby /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi/extconf.rb
    creating Makefile
    <--- ext/lsapi
    <--- ext
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8 > ruby setup.rb setup
    ---> ext
    ---> ext/lsapi
    make
    make: Warning: File `Makefile' has modification time 1.1e+03 s in the future
    gcc -fPIC -g -O2  -I. -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.8 -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.
    8 -I/globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi   -c lsruby.c
    gcc -fPIC -g -O2  -I. -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.8 -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.
    8 -I/globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi   -c lsapilib.c
    gcc -Wl,-G  -L'/globalhome2/eg818/ruby/lib' -Wl,-R'/globalhome2/eg818/ruby/lib' -o lsapi.so lsruby.o lsapilib.o  -ldl -lcrypt -lm   
    -lc
    make: warning:  Clock skew detected.  Your build may be incomplete.
    <--- ext/lsapi
    <--- ext
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8 > ruby setup.rb install
    rm -f InstalledFiles
    ---> ext
    ---> ext/lsapi
    mkdir -p /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8
    install lsapi.so /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/.
    <--- ext/lsapi
    <--- ext
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8 > 
    But I don't think this warning is important.

    Anyway, your help will be appreciated... I am near then end of a nightmare...

    PS : Two optional questions :
    1) Do you prescribe to store vhost configuration under the lsws directory or under the application conf directory ?
    2) Is there a way to have one listener (say 8088) that serves several rails apps like http://hulk3:8088/my_app_1 and http://hulk3:8088/my_app_2

    Thanks in advance.
  8. mistwang

    mistwang LiteSpeed Staff

    ruby-lsapi need to be patched on solaris 8, please do the following:
    Please open ext/lsapi/lsruby.c, replace all "unsetenv" with "ruby_unsetenv".
    Open ext/lsapi/Makefile, search for "LIBS" variable, add "-lsocket -lnsl" at the beginning.
    Run "make install" under ext/lsapi/ directory.

    We will find a way to generate a special version of Makefile for Solaris, please patch it manually for now. Please let me know it works or not.

    Answer to your other questions:
    1) I prefer store vhost configuration under lsws/conf/ directory, if stored under the application conf directory, you need to make sure that directory is writable for the user that lshttpd running as.
    2) You can host multiple rails app in different path under one vhost. You need to create those Rails context manually, not through our rails vhost template.
  9. perezsy

    perezsy New Member

    It doesnt work.

    In the file lsruby.c
    All the "unsetenv" were in the lsapi_Init function and have been replaced by "ruby_unsetenv".

    In the file Makefile
    I changed the LIB variable from :
    Code:
    LIBS =   -ldl -lcrypt -lm   -lc
    to
    Code:
    LIBS = -lsocket -lnsl  -ldl -lcrypt -lm   -lc
    But when compiling in the ext/lsapi directory with "make install" I get this :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi > make install 
    make: Warning: File `Makefile' has modification time 1e+03 s in the future
    gcc -fPIC -g -O2  -I. -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.8 -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.
    8 -I/globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi   -c lsruby.c
    gcc -Wl,-G  -L'/globalhome2/eg818/ruby/lib' -Wl,-R'/globalhome2/eg818/ruby/lib' -o lsapi.so lsruby.o lsapilib.o  -lsocket -lnsl  -ld
    l -lcrypt -lm   -lc
    ./install-sh -c -m 0755 lsapi.so /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8
    make: ./install-sh: Command not found
    make: *** [/globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/lsapi.so] Error 127
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi > 
    What is this file install-sh ?
    I tried to manually copy the file lsapi.so from "ext/lsapi" to "site_ruby/1.8/sparc-solaris2.8" but when starting an irb session with require 'lsapi' I get this :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi > cp lsapi.so /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-
    solaris2.8/lsapi.so
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi > irb
    irb(main):001:0> require 'lsapi'
    /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/lsapi.so: warning: already initialized constant ENV
    /globalhome2/eg818/ruby/lib/ruby/1.8/irb/input-method.rb:49:in `gets': private method `gets' called for #<LSAPI:0xee2a8> (NoMethodEr
    ror)
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:132:in `eval_input'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:259:in `signal_status'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:131:in `eval_input'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:189:in `buf_input'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/slex.rb:76:in `match'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:287:in `token'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:263:in `lex'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:234:in `each_top_level_statement'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in `each_top_level_statement'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in `each_top_level_statement'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:70:in `start'
            from /globalhome2/eg818/ruby/lib/ruby/1.8/irb.rb:69:in `start'
            from /globalhome2/eg818/ruby/bin/irb:13
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.8/ext/lsapi > 
    I tried the test app and it works !
    So I can see here one real error (the install-sh) and may be one small "error" raised by the require 'lsapi' in the irb session.

    Can you confirm please that the irb problem is "normal" and that what the install-sh file would have done is a copy and a chmod 755.

    Thank you for your precious help !
  10. mistwang

    mistwang LiteSpeed Staff

    What you did is correct.
    I had the same problem with install-sh on solaris, just copy it manually.
    The problem with irb is that "gets" function is not defined with LSAPI. Will fix that.
  11. mistwang

    mistwang LiteSpeed Staff

  12. perezsy

    perezsy New Member

    Well, the test app was running fine until I choose to install the Oracle OCI8 driver for Oracle (ruby-oci8-0.1.16). At that moment the static page of the test app is ok but the dynamic part last forever and finally ends with a "Request Timeout" error page (the test app does not use the database).

    If I start the server without even browsing to the test app I get this in the stderr.log file :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs > more stderr.log
    /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49: [BUG] Segmentation fault
    ruby 1.8.4 (2005-12-24) [sparc-solaris2.8]
    
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs >
    
    No need to say that the test app and my final app (which use Oracle) are running fine with WEBrick.

    I tried something else : the lspai 1.9. I saw that you replaced the "unsetenv" with "ruby_unsetenv" (good) but the make file still has to be modified.
    But it did not even compile and gives this error message :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.9/ext/lsapi > make install
    gcc -fPIC -g -O2  -I. -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.8 -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.
    8 -I/globalhome2/eg818/ruby-lsapi-1.9/ext/lsapi   -c lsruby.c
    gcc -fPIC -g -O2  -I. -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.8 -I/globalhome2/eg818/ruby/lib/ruby/1.8/sparc-solaris2.
    8 -I/globalhome2/eg818/ruby-lsapi-1.9/ext/lsapi   -c lsapilib.c
    lsapilib.c: In function `readBodyToReqBuf':
    lsapilib.c:727: parse error before `int'
    lsapilib.c:731: `bodyLeft' undeclared (first use in this function)
    lsapilib.c:731: (Each undeclared identifier is reported only once
    lsapilib.c:731: for each function it appears in.)
    lsapilib.c: In function `LSAPI_ReqBodyGetLine_r':
    lsapilib.c:777: parse error before `char'
    lsapilib.c:779: `p' undeclared (first use in this function)
    lsapilib.c:780: `pCur' undeclared (first use in this function)
    make: *** [lsapilib.o] Error 1
    [eg818@hulk3.bil.lu] /globalhome2/eg818/ruby-lsapi-1.9/ext/lsapi >
    Do you think I need to compile the ruby OCI driver with specific librairies (lsapi for ex.) ?
    How are the server and the database linked ? I thought that the db connection was the responsibility of the Rails app not the server ?

    For your information I use the following :
    Ruby 1.8.4
    Rails 1.1.6
    LiteSpeed 2.2.2
    Oracle 9.2.0
    Solaris 2.8
    Ruby OCI8 0.1.16


    Thanks in advance
  13. mistwang

    mistwang LiteSpeed Staff

    The compile error will be fixed, some C compiler is more strict about variable delaration in a function. Forgot to put in the fix for Makefile.

    For OCI dirver, maybe it is due to missing environment variable required by OCI driver. You can add those environment variables under "Rails" tab. WEBrick bring in all the shell environment variables, LSAPI does not, have to set manually.
  14. perezsy

    perezsy New Member

    It works better and I can access my app for a certain period.

    But it runs somertimes slower than WEBrick on the same machine and I have this error in the stderr.log :
    Code:
    /globalhome2/eg818/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.8/lsapi.so: warning: already initialized constant ENV
    After leaving my app for 5 minutes and come back to it, the app does not respond anymore.

    Here is what my error.log file looks like :
    Code:
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs > more error.log
    2006-09-21 16:42:55.348 [NOTICE] Loading LiteSpeed/2.2.2 Standard ...
    2006-09-21 16:42:55.461 [NOTICE] [ADMIN] server socket: 127.0.0.1:7283
    2006-09-21 16:42:55.461 [NOTICE] Loading configuration from /globalhome2/eg818/lsws/conf/httpd_config.xml ...
    2006-09-21 16:42:55.465 [NOTICE] [suEXEC] disabled, web server is not started by root user.
    2006-09-21 16:42:55.466 [NOTICE] Recovering server socket: [*:8088]
    2006-09-21 16:42:55.466 [NOTICE] Recovering server socket: [*:7080]
    2006-09-21 16:42:55.469 [INFO] old priority: 0, new priority: 0
    2006-09-21 16:42:55.469 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
    2006-09-21 16:42:55.493 [NOTICE] The maximum number of file descriptor limit is set to 1024.
    2006-09-21 16:42:55.637 [NOTICE] [AutoRestarter] new child process with pid=14563 is forked!
    2006-09-21 16:42:56.150 [NOTICE] [AutoUpdate] Checking for new releases...
    2006-09-21 16:42:56.243 [NOTICE] [Child: 14563] Setup swapping space...
    2006-09-21 16:42:56.245 [NOTICE] [Child: 14563] LiteSpeed/2.2.2 Standard starts successfully!
    2006-09-21 16:43:01.261 [NOTICE] [AutoUpdate] Failed, updateagent exit code: 3
    2006-09-21 16:43:05.193 [INFO] [xxx.xxx.xxx.xxx:2452-0#WebUploader] Index file is not available in [/globalhome2/eg818/lsws/WebUploade
    r/public/]
    2006-09-21 16:43:34.343 [INFO] [xxx.xxx.xxx.xxx:2454-0#WebUploader] Index file is not available in [/globalhome2/eg818/lsws/WebUploade
    r/public/]
    2006-09-21 16:43:34.900 [INFO] [xxx.xxx.xxx.xxx:2454-2#WebUploader] Index file is not available in [/globalhome2/eg818/lsws/WebUploade
    r/public/uploads/]
    2006-09-21 16:43:39.233 [INFO] [xxx.xxx.xxx.xxx:2455-4#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/destina
    tions]
    2006-09-21 16:43:41.868 [INFO] [xxx.xxx.xxx.xxx:2454-5#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/destina
    tions/edit/12]
    2006-09-21 16:43:44.144 [INFO] [xxx.xxx.xxx.xxx:2455-7#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/destina
    tions/list]
    2006-09-21 16:43:46.338 [INFO] [xxx.xxx.xxx.xxx:2454-6#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users]
    2006-09-21 16:44:02.455 [INFO] [xxx.xxx.xxx.xxx:2456-1#WebUploader] Index file is not available in [/globalhome2/eg818/lsws/WebUploade
    r/public/uploads/]
    2006-09-21 16:44:05.856 [INFO] [xxx.xxx.xxx.xxx:2456-2#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/uploads
    /download_file] 
    2006-09-21 16:44:06.712 [INFO] [xxx.xxx.xxx.xxx:2456-3#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/uploads
    /list] 
    2006-09-21 16:44:12.109 [INFO] [xxx.xxx.xxx.xxx:2456-4#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_ty
    pes]
    2006-09-21 16:44:13.801 [INFO] [xxx.xxx.xxx.xxx:2457-2#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_ty
    pes/edit/23]
    2006-09-21 16:44:15.684 [INFO] [xxx.xxx.xxx.xxx:2456-5#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_ty
    pes/list]
    2006-09-21 16:44:18.292 [INFO] [xxx.xxx.xxx.xxx:2457-3#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users]
    2006-09-21 16:44:21.428 [INFO] [xxx.xxx.xxx.xxx:2457-4#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users/e
    dit/5]
    2006-09-21 16:44:24.860 [INFO] [xxx.xxx.xxx.xxx:2457-5#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users/l
    ist]
    2006-09-21 16:44:26.946 [INFO] [xxx.xxx.xxx.xxx:2457-6#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users/e
    dit/12]
    2006-09-21 16:44:28.852 [INFO] [xxx.xxx.xxx.xxx:2457-7#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/users/l
    ist]
    2006-09-21 16:44:31.935 [INFO] [xxx.xxx.xxx.xxx:2457-9#WebUploader] Index file is not available in [/globalhome2/eg818/lsws/WebUploade
    r/public/uploads/]
    2006-09-21 16:45:08.064 [INFO] [xxx.xxx.xxx.xxx:2462-0#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_ty
    pes]
    2006-09-21 16:50:11.041 [NOTICE] [Rails:WebUploader:/] stop worker processes
    2006-09-21 16:50:22.501 [INFO] [xxx.xxx.xxx.xxx:2466-0#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_ty
    pes/edit/23]
    [eg818@hulk3.bil.lu] /globalhome2/eg818/lsws/logs > 
    Thanks in advance
  15. mistwang

    mistwang LiteSpeed Staff

    You can safely ignore that warning.
    That's because that "Max idle time" has been configured to 300 seconds under rails tab. The server will stop the ruby processes if the application idle for that long. However, when next request cames in, the server should start up another set of ruby process to handle requests, there will be a few seconds delay due to that, but the request should succeed, I don't know why it failed.

    How many ruby processes are there after idling for 5 minutes? Is there new ruby processes started after new requests comes in.

    You can make the ruby process persistent if you remove the "Max idle time" configuration.
  16. mistwang

    mistwang LiteSpeed Staff

    ruby-lsapi 1.9 has been updated to make the request parameters match WEBrick and Mongrel more closely. Give it a try. :)
  17. perezsy

    perezsy New Member

    I'll try the ruby-lsapi 1.9 later because I have very convenitional URLs and request parameters. But I'll let you know so you will be able to deliver a ruby api that is getting better over time. ;)

    Back to my problem :
    Here is what I did :
    0- LSWS already configured for my app with the "EasyRailsWithSuEXEC" and I left the "MaxIdleTime" to 300
    1- Stop and start the server (with "lswctrl stop" and "lswsctrl start")
    2- Before pointing to my app I have 2 ruby processes : "ruby /globalhome2/eg818/lsws/fcgi-bin/RailsRunner.rb"
    3- Then I browse my app with no problem
    4- I leave my app for 5 minutes and effectively after that 5 minutes there are no more ruby processes
    5- Then using the same browser window I click on link of my app but but no response comes from the server
    6- Going back to the server I can see that two ruby processes were created and after 5 minutes they die without serving my request
    7- I choose to open a new browser instance not a new window with CTRL+N and when I point to my app it responds fine and on the server side I have two new ruby processes
    8- And here is the weird thing, when I go back to my first browser window, it responds fine ! :confused:

    I tried to set the "MaxIdleTime" to 0 and so the filed appears to "N/A", applied the changes and gracefully restarted the server.
    Here is what I have :
    1- The ruby processes still die after 5 minutes :confused:
    2- But when I use my app after 5 minutes it responds fine (except that it takes some seconds to create the ruby processes)

    Do you have a clue ?

    Thanks in advance

    PS : One small remark.
    Don't you think that in the error.log file there should not be messages like this :
    Code:
    2006-09-22 10:49:12.626 [INFO] [xxx.xxx.xxx.xxx:1576-0#WebUploader] File not found [/globalhome2/eg818/lsws/WebUploader/public/file_types]
    because the app is a Rails app...
    Last edited: Sep 22, 2006
  18. mistwang

    mistwang LiteSpeed Staff

    I cannot reproduce the problem you described. :(

    Are you using LSWS 2.2.2?

    When MaxIdleTime is not zero, LSWS can start new ruby process and respond correctly in our lab. If you want to bother, you can "truss" those ruby processes and turn on LSWS debug logging, to check exactly what was happening when there is no response.

    When MaxIdleTime is -1 or N/A, (should not be 0), there should be at least one persistent ruby process no matter how long you app has not been accessed.

    "File not found" in error.log is normal.

Share This Page