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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Problem installing LiteSpeed 2.2.1 Standard on UNIX

Reply
 
Thread Tools Display Modes
  #11  
Old 09-20-2006, 01:03 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Please try http://www.litespeedtech.com/package...api-1.9.tar.gz, "gets" function has been added.

Please let me know the result.
Reply With Quote
  #12  
Old 09-21-2006, 05:00 AM
perezsy perezsy is offline
New Member
 
Join Date: Sep 2006
Posts: 8
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
Reply With Quote
  #13  
Old 09-21-2006, 07:54 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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.
Reply With Quote
  #14  
Old 09-21-2006, 08:21 AM
perezsy perezsy is offline
New Member
 
Join Date: Sep 2006
Posts: 8
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
Reply With Quote
  #15  
Old 09-21-2006, 08:40 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
You can safely ignore that warning.
Quote:
After leaving my app for 5 minutes and come back to it, the app does not respond anymore.
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.
Reply With Quote
  #16  
Old 09-21-2006, 11:34 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
ruby-lsapi 1.9 has been updated to make the request parameters match WEBrick and Mongrel more closely. Give it a try.
Reply With Quote
  #17  
Old 09-22-2006, 02:02 AM
perezsy perezsy is offline
New Member
 
Join Date: Sep 2006
Posts: 8
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 !

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
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 by perezsy; 09-22-2006 at 02:13 AM..
Reply With Quote
  #18  
Old 09-22-2006, 09:53 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
any problem with installing Zend Optimizer? aww Install/Configuration 1 05-10-2007 07:40 PM
Installing Oracle support for litespeed reshu1596 PHP 1 02-14-2007 06:53 AM
Problem running Gallery under LiteSpeed kchrist PHP 4 10-01-2006 02:53 PM
Tutorial in installing LiteSpeed with FastCGI and Catalyst Conundrum CGI/Perl/Python 5 07-18-2006 07:04 AM
Installing phpBB2 under litespeed webserver stefan PHP 11 06-01-2006 11:43 PM


All times are GMT -7. The time now is 08:03 AM.



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