AlkantarClanX12

Your IP : 3.147.86.246


Current Path : /proc/thread-self/root/opt/alt/ruby19/lib64/ruby/gems/1.9.1/doc/ruby-lsapi-5.6/rdoc/
Upload File :
Current File : //proc/thread-self/root/opt/alt/ruby19/lib64/ruby/gems/1.9.1/doc/ruby-lsapi-5.6/rdoc/README.html

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta content="text/html; charset=US-ASCII" http-equiv="Content-Type" />

  <title>File: README [ruby-lsapi-5.6 Documentation]</title>

  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />

  <script src="./js/jquery.js" type="text/javascript"
    charset="utf-8"></script>
  <script src="./js/thickbox-compressed.js" type="text/javascript"
    charset="utf-8"></script>
  <script src="./js/quicksearch.js" type="text/javascript"
    charset="utf-8"></script>
  <script src="./js/darkfish.js" type="text/javascript"
    charset="utf-8"></script>
</head>

<body class="file">
  <div id="metadata">
    <div id="home-metadata">
      <div id="home-section" class="section">
        <h3 class="section-header">
          <a href="./index.html">Home</a>
          <a href="./index.html#classes">Classes</a>
          <a href="./index.html#methods">Methods</a>
        </h3>
      </div>
    </div>

    <div id="project-metadata">
      
      
      <div id="fileindex-section" class="section project-section">
        <h3 class="section-header">Files</h3>
        <ul>
        
          <li class="file"><a href="./README.html">README</a></li>
        
        </ul>
      </div>
      

      <div id="classindex-section" class="section project-section">
        <h3 class="section-header">Class Index
          <span class="search-toggle"><img src="./images/find.png"
            height="16" width="16" alt="[+]"
            title="show/hide quicksearch" /></span></h3>
        <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
        <fieldset>
          <legend>Quicksearch</legend>
          <input type="text" name="quicksearch" value=""
            class="quicksearch-field" />
        </fieldset>
        </form>

        <ul class="link-list">
        
        </ul>
        <div id="no-class-search-results" style="display: none;">No matching classes.</div>
      </div>

      
    </div>
  </div>

  <div id="documentation">
    
<p>lsapi - LSAPI extension for Ruby</p>

<h32></h32>

<p>INSTALL</p>
<hr style="height: 5px">

<pre>$ ruby setup.rb config
$ ruby setup.rb setup
# ruby setup.rb install</pre>

<p>USAGE</p>
<hr style="height: 3px">

<p>General CGI scripts ^^^^^^^^^^^^^^^^^^^ The most efficient way to use LSAPI
interface is to modify your CGI scripts.  You need to add the following
code to your CGI scripts:</p>

<pre>require 'lsapi'

while LSAPI.accept != nil

   &lt;your CGI script&gt;
   ...

end</pre>

<p>There is no need to change the way that how CGI environment variables  are
being accessed in your scripts.</p>

<p>You can find some examples under examples/ folder.</p>

<p>Ruby Script Runner ^^^^^^^^^^^^^^^^^^ If you don't want to change your
existing Ruby CGI code, you can use our  Ruby script runner under scripts/
folder. You need to configure  lsruby_runner.rb as a LSAPI application,
then add a script handler  for "rb" suffix.</p>

<p>Rails dispatcher ^^^^^^^^^^^^^^^^</p>

<p>With Ruby LSAPI, we proudly provide a optimum platform for Rails
application deployment. Ruby LSAPI has the following advantages over other
solutions.</p>

<pre>* Easy configuration, deploy a Rails application only take a few clicks
  with our Rails easy configuration
* Fast startup, the expensive Rails framework initialization only takes
  place once when multiple processes need to be started
* Resource efficience, ruby processes can be started on demand, idle
  process will be stop.</pre>

<p>To use LSAPI with Ruby on Rails, please check out our toturial <a
href="http://www.litespeedtech.com/support/wiki/doku.php">www.litespeedtech.com/support/wiki/doku.php</a></p>

<p>There are a few environment variables that can be tweaked to tune ruby 
LSAPI process.</p>
<ul><li>
<p>LSAPI_CHILDREN                (default: 0)</p>
</li></ul>

<p>LSAPI_CHILDREN controls the maximum number of children processes can be
started by the first ruby process started by web server. When set to
&lt;=1, the first ruby process will handle request by itself, without
starting any child process. When LSAPI_CHILDREN is &gt;1, the LSAPI
application is stared in "Self Managed Mode", which will start children
processes based on demand. With Rails easy configuration, LSAPI_CHILDREN is
set to the value of "Max Connections" by web server, no need to set it
explicitly.</p>

<p>Usually, there is no need to set value of LSAPI_CHILDREN over 100 in most
server environment.</p>
<ul><li>
<p>LSAPI_AVOID_FORK              (default: 0)</p>
</li></ul>

<p>LSAPI_AVOID_FORK specifies the policy of the internal process manager in
"Self Managed Mode". When set to 0, the internal process manager will stop
and start children process on demand to save system resource. This is
preferred in a shared hosting environment. When set to 1, the internal
process manager will try to avoid freqently stopping and starting children
process. This might be preferred in a dedicate hosting environment.</p>
<ul><li>
<p>LSAPI_EXTRA_CHILDREN          (default: 1/3 of LSAPI_CHILDREN or 0)</p>
</li></ul>

<p>LSAPI_EXTRA_CHILDREN controls the maximum number of extra children
processes can be started when some or all existing children processes are
in malfunctioning state. Total number of children processes will be reduced
to LSAPI_CHILDREN level as soon as service is back to normal. When
LSAPI_AVOID_FORK is set to 0, the default value is 1/3 of LSAPI_CHIDLREN,
When LSAPI_AVOID_FORK is set to 1, the default value is 0.</p>
<ul><li>
<p>LSAPI_MAX_REQS                (default value: 10000)</p>
</li></ul>

<p>LSAPI_MAX_REQS specifies the maximum number of requests each child process
will handle before it exits automatically. This parameter can help reducing
memory usage when there are memory leaks in the application.</p>
<ul><li>
<p>LSAPI_MAX_IDLE                (default value: 300 seconds)</p>
</li></ul>

<p>In Self Managed Mode, LSAPI_MAX_IDLE controls how long a idle child  
process will wait for a new request before exit. This option help 
releasing system resources taken by idle processes.</p>
<ul><li>
<p>LSAPI_MAX_IDLE_CHILDREN</p>

<pre>(default value: 1/3 of LSAPI_CHILDREN or LSAPI_CHILDREN)</pre>
</li></ul>

<p>In Self Managed Mode, LSAI_MAX_IDLE_CHILDREN controls how many idle 
children processes are allowed. Excessive idle children processes will be
killed by the parent process. When LSAPI_AVOID_FORK is set to 0, the
default value is 1/3 of LSAPI_CHIDLREN, When LSAPI_AVOID_FORK is set to 1,
the default value is LSAPI_CHILDREN.</p>
<ul><li>
<p>LSAPI_MAX_PROCESS_TIME        (default value: 300 seconds)</p>
</li></ul>

<p>In Self Managed Mode, LSAPI_MAX_PROCESS_TIME controls the maximum 
processing time allowed when processing a request. If a child process can
not finish processing of a request in the given time period, it  will be
killed by the parent process. This option can help getting rid  of dead or
runaway child process.</p>
<ul><li>
<p>LSAPI_PGRP_MAX_IDLE           (default value: FOREVER )</p>
</li></ul>

<p>In Self Managed Mode, LSAPI_PGRP_MAX_IDLE controls how long the parent
process will wait before exiting when there is no child process. This
option help releasing system resources taken by an idle parent  process.</p>
<ul><li>
<p>LSAPI_PPID_NO_CHECK</p>
</li></ul>

<p>By default a LSAPI application check the existence of its parent process
and exits automatically if the parent process died. This is to reduce 
orphan process when web server is restarted. However, it is desireable  to
disable this feature, such as when a LSAPI process was started  manually
from command line. LSAPI_PPID_NO_CHECK should be set when  you want to
disable the checking of existence of parent process.</p>

<p>License</p>
<hr style="height: 5px">

<p>LSAPI library code is under BSD license</p>

<p>LSAPI ruby extension code is under Ruby license</p>
<ul><li>
<p>((&lt;URL:<a
href="http://www.ruby-lang.org/ja/LICENSE.txt">www.ruby-lang.org/ja/LICENSE.txt</a>&gt;))
(Japanese)</p>
</li><li>
<p>((&lt;URL:<a
href="http://www.ruby-lang.org/en/LICENSE.txt">www.ruby-lang.org/en/LICENSE.txt</a>&gt;))
(English)</p>
</li></ul>

<p>Copyright</p>
<hr style="height: 7px">

<p>Copyright (C) 2006 Lite Speed Technologies Inc.</p>

  </div>

  <div id="validator-badges">
    <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
    <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
      Rdoc Generator</a> 2</small>.</p>
  </div>
</body>
</html>