|
|

09-21-2006, 05:00 AM
|
|
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
|

09-21-2006, 07:54 AM
|
|
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.
|

09-21-2006, 08:21 AM
|
|
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
|

09-21-2006, 08:40 AM
|
|
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.
|

09-21-2006, 11:34 AM
|
|
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. 
|

09-22-2006, 02:02 AM
|
|
New Member
|
|
Join Date: Sep 2006
Posts: 8
|
|
|
Last edited by perezsy; 09-22-2006 at 02:13 AM..
|

09-22-2006, 09:53 AM
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:03 AM.
|
|