|
|

09-14-2006, 01:01 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
That's it. The installation overwrites the ruby-lsapi library file in the global ruby folder of your os.
No need to modify your app. Though to be extra safe, the final "install" step should be performed with no ruby/rails process running just to make sure old libs are overwritten without problem.
|

09-14-2006, 02:18 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
To be safe, do "gem uninstall ruby-lsapi" to make sure the gem version is removed.
|

09-14-2006, 09:48 PM
|
|
Member
|
|
Join Date: Sep 2006
Posts: 38
|
|
|
I uninstalled the gem, just to make sure.
I have the latest version of LiteSpeed installed, and LSAPI 1.8. It has been about 7 hours since I restarted the server - and I now have 26 processes running.
Max connections is set to 10. Is there any other configuration variable somewhere that could be set incorrectly and leading to this???
Here is what is in the log:
2006-09-15 00:35:01.639 INFO [127.0.0.1:52875-0#Example] File not found [/usr/bin/DEFAULT/html/whm-server-status]
2006-09-15 00:40:02.608 INFO [127.0.0.1:53698-0#Example] File not found [/usr/bin/DEFAULT/html/whm-server-status]
2006-09-15 00:41:28.491 INFO [65.111.164.187:54922-0#VHOSTNAMEREMOVED] Index file is not available in [/home/xxxxxxx/releases/20060911024632/public/]
2006-09-15 00:45:02.298 INFO [127.0.0.1:54471-0#Example] File not found [/usr/bin/DEFAULT/html/whm-server-status]
2006-09-15 00:46:31.095 NOTICE [Rails:VHOSTNAMEREMOVED:/] stop worker processes
Last edited by jp_n9; 09-14-2006 at 09:52 PM..
Reason: Typo
|

09-15-2006, 06:48 AM
|
|
Member
|
|
Join Date: Aug 2006
Posts: 18
|
|
Quote:
Originally Posted by jp_n9
I uninstalled the gem, just to make sure.
I have the latest version of LiteSpeed installed, and LSAPI 1.8. It has been about 7 hours since I restarted the server - and I now have 26 processes running.
Max connections is set to 10. Is there any other configuration variable somewhere that could be set incorrectly and leading to this???
|
I think you are within the limit based on the Max Connections setting. It was kind of confusing for me too, but this is what I am doing now.
- Figure out how many processes you can afford on your vps or shared account
- Divide it by 3, and set your MAX Connections to that number.
NOTE: EACH virtual host you set has to have its own Max Conn. setting. It is not global as far as I can tell, so if you have 3 vhosts at 10 each, you're looking at maybe 10*3*2 at the very least if the load increases , that is a LOT of ram because RoR is a frikkin Hog when it comes to real RAM usage. So, for 3 vhosts at 10 max each and a "reasonable" default behaviour of going to "twice the configured value" as described by litespeedtech, you are looking at 10 * 3 * 2 * 20mb = 1.2 GB or RES mem usage, obviously, if you have less than that available, your system will start hitting the swap, it will delay the request serving by the RoR, and that would feed the vicious cycle. pretty soon, you could start thrashing.
Unfortunately the documentation is not clear on how many processes each lsapi process can handle. If this was clear, then people won't set it to 10.. 10 *20 *3 is more than half gig of ACTUAL ram, and most people don't have that even on a VPS system.
Suggestion (to litespeedtech): Put a tool tip next to the Max Connections entry which says, "LSWS may start upto 3 times as many rails processes (at 20mb each) as this setting"
This will be a clear warning to us all that this setting can be resource intensive.
Last edited by amalik; 09-15-2006 at 06:54 AM..
Reason: added mem usage calcs.
|

09-15-2006, 07:19 AM
|
|
Member
|
|
Join Date: Sep 2006
Posts: 38
|
|
Quote:
Originally Posted by amalik
Suggestion (to litespeedtech): Put a tool tip next to the Max Connections entry which says, "LSWS may start upto 3 times as many rails processes (at 20mb each) as this setting"
This will be a clear warning to us all that this setting can be resource intensive.
|
Well if what you are saying is correct, then I'm not sure adding a tool tip is the solution.
If the "Max Connections" value is supposed to control the maximum processes created, then it should not create any more processes than the value you enter there. Maximum != Maximum * 3. It just doesn't make sense. Of course, the wording itself is already confusing, does "Connection" == "Ruby Process"?
Also, I'm not sure if that "Max Connection" value is supposed to be for the server or per Rails Application. Being that it is in the Server Tuning section - it would seem as though it should be a Server wide setting. Regardless how many Rails apps are installed, no more than the Maximum value should be started.
|

09-15-2006, 07:54 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
[QUOTE] Of course, the wording itself is already confusing, does "Connection" == "Ruby Process"?/QUOTE]
Sorry for the confusion, for each connection to backend Rails application, there must be a Ruby process which is responsible for handling the request.
"Max connection" under the Rails tab is the default value for each Rails application configured, it is per application, not the maximum regardless number of rails apps. The web server does not control number of ruby processes directly, they are managed by the process manager in the first ruby process started by the server. It is not possible to coordinate number of ruby processes across multiple Rails applications.
So, if you have multiple Rails applications on your server, what you see is normal. If you have only one app, something might be wrong, and I'd like to take a look at those ruby processes running on your server.
The process manager in the first ruby process is allowed to start more children processes than the "max connections" configured, max to 2 * "max connections", when some children ruby processes stop responding to requests, and LSWS is allowed to start another group of ruby process for the same application, if LSWS think the whole group of ruby process is not working.
Check the "Initial Request Timeout" under rails tab, it should be large enough, default is "60", increase it if any request of your rails application takes longer to process than that.
Hope this will help. 
|

09-15-2006, 08:00 AM
|
|
Member
|
|
Join Date: Sep 2006
Posts: 38
|
|
|
What is the correlation between the "Max Connections" value under the Rails tab and the "Max Connections" under the "Tuning" tab? Does one have precedence over the other?
|

09-15-2006, 08:10 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
They are not related.
"Max connections" under "Tuning" tab is the maximum connections that LSWS can handle. All active connections included.
"Max connections" under "Rails" tab is the maximum number of connections that LSWS uses to communicate with backend ruby engine.
|

09-15-2006, 08:17 AM
|
|
Member
|
|
Join Date: Sep 2006
Posts: 38
|
|
Quote:
Originally Posted by mistwang
They are not related.
"Max connections" under "Tuning" tab is the maximum connections that LSWS can handle. All active connections included.
"Max connections" under "Rails" tab is the maximum number of connections that LSWS uses to communicate with backend ruby engine.
|
Is the max connections under "Tuning" also multiplied by 3? What is the resource cost of each "connection" under the "Tuning" tab?
|

09-15-2006, 08:28 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
Quote:
|
Is the max connections under "Tuning" also multiplied by 3? What is the resource cost of each "connection" under the "Tuning" tab?
|
No, it is not. The resource cost is number of file descriptors, no need to worry about that. "300" is the max value for the current standard edition, which is enough for pretty large website.
|
| 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 03:20 PM.
|
|