1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
4        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5              This file is generated from xml source: DO NOT EDIT
6        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7      -->
8<title>mpm_common - Apache HTTP サーバ</title>
9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
12<script src="/style/scripts/prettify.min.js" type="text/javascript">
13</script>
14
15<link href="/images/favicon.ico" rel="shortcut icon" /></head>
16<body>
17<div id="page-header">
18<p class="menu"><a href="/mod/">モジュール</a> | <a href="/mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">用語</a> | <a href="/sitemap.html">サイトマップ</a></p>
19<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
20<img alt="" src="/images/feather.gif" /></div>
21<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
22<div id="path">
23<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">モジュール</a></div>
24<div id="page-content">
25<div id="preamble"><h1>Apache MPM 共通ディレクティブ</h1>
26<div class="toplang">
27<p><span>翻訳済み言語: </span><a href="/de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
28<a href="/en/mod/mpm_common.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
29<a href="/fr/mod/mpm_common.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
30<a href="/ja/mod/mpm_common.html" title="Japanese">&nbsp;ja&nbsp;</a> |
31<a href="/tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
32</div>
33<div class="outofdate">この日本語訳はすでに古くなっている
34            可能性があります。
35            最近更新された内容を見るには英語版をご覧下さい。
36        </div>
37<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>二つ以上のマルチプロセッシングモジュール (MPM)
38で実装されているディレクティブのコレクション</td></tr>
39<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>MPM</td></tr></table>
40</div>
41<div id="quickview"><h3 class="directives">ディレクティブ</h3>
42<ul id="toc">
43<li><img alt="" src="/images/down.gif" /> <a href="#coredumpdirectory">CoreDumpDirectory</a></li>
44<li><img alt="" src="/images/down.gif" /> <a href="#enableexceptionhook">EnableExceptionHook</a></li>
45<li><img alt="" src="/images/down.gif" /> <a href="#gracefulshutdowntimeout">GracefulShutdownTimeout</a></li>
46<li><img alt="" src="/images/down.gif" /> <a href="#listen">Listen</a></li>
47<li><img alt="" src="/images/down.gif" /> <a href="#listenbacklog">ListenBackLog</a></li>
48<li><img alt="" src="/images/down.gif" /> <a href="#maxconnectionsperchild">MaxConnectionsPerChild</a></li>
49<li><img alt="" src="/images/down.gif" /> <a href="#maxmemfree">MaxMemFree</a></li>
50<li><img alt="" src="/images/down.gif" /> <a href="#maxrequestworkers">MaxRequestWorkers</a></li>
51<li><img alt="" src="/images/down.gif" /> <a href="#maxsparethreads">MaxSpareThreads</a></li>
52<li><img alt="" src="/images/down.gif" /> <a href="#minsparethreads">MinSpareThreads</a></li>
53<li><img alt="" src="/images/down.gif" /> <a href="#pidfile">PidFile</a></li>
54<li><img alt="" src="/images/down.gif" /> <a href="#receivebuffersize">ReceiveBufferSize</a></li>
55<li><img alt="" src="/images/down.gif" /> <a href="#scoreboardfile">ScoreBoardFile</a></li>
56<li><img alt="" src="/images/down.gif" /> <a href="#sendbuffersize">SendBufferSize</a></li>
57<li><img alt="" src="/images/down.gif" /> <a href="#serverlimit">ServerLimit</a></li>
58<li><img alt="" src="/images/down.gif" /> <a href="#startservers">StartServers</a></li>
59<li><img alt="" src="/images/down.gif" /> <a href="#startthreads">StartThreads</a></li>
60<li><img alt="" src="/images/down.gif" /> <a href="#threadlimit">ThreadLimit</a></li>
61<li><img alt="" src="/images/down.gif" /> <a href="#threadsperchild">ThreadsPerChild</a></li>
62<li><img alt="" src="/images/down.gif" /> <a href="#threadstacksize">ThreadStackSize</a></li>
63</ul>
64<ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
65
66<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
67<div class="directive-section"><h2><a name="CoreDumpDirectory" id="CoreDumpDirectory">CoreDumpDirectory</a> <a name="coredumpdirectory" id="coredumpdirectory">ディレクティブ</a></h2>
68<table class="directive">
69<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Apache がコアダンプする前に移動を試みるディレクトリ
70</td></tr>
71<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CoreDumpDirectory <var>directory</var></code></td></tr>
72<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>デフォルトの設定は説明文を読んでください</code></td></tr>
73<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
74<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
75<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
76</table>
77    <p>Apache がコアダンプする前に移動を試みるディレクトリを制御します。
78    デフォルト値は <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code>
79    ディレクトリですが、このディレクトリはサーバの実行されているユーザ権限で
80    書き込み可能であるべきではないので、通常はコアダンプは書き込まれません。
81    デバッグのためにコアダンプが必要であれば、
82    このディレクティブを使って他の位置にコアダンプを書き出すようにできます。</p>
83
84    <div class="note"><h3>Linux でのコアダンプ</h3>
85      <p>Apache が root として起動されて、別のユーザの権限に以降した場合は
86      Linux のカーネルはディレクトリがプロセスの権限で書き込み可能な場合でさえも
87      コアダンプを<em>無効</em>にします。Apache (2.0.46 以降) は
88      Linux 2.4 以降ではコアダンプを行なうように再指定しますが、それは
89      <code class="directive">CoreDumpDirectory</code> を明示的に設定したときに
90      限ります。</p>
91    </div>
92
93</div>
94<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
95<div class="directive-section"><h2><a name="EnableExceptionHook" id="EnableExceptionHook">EnableExceptionHook</a> <a name="enableexceptionhook" id="enableexceptionhook">ディレクティブ</a></h2>
96<table class="directive">
97<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クラッシュの後に例外ハンドラを実行するフックを有効にする</td></tr>
98<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableExceptionHook On|Off</code></td></tr>
99<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableExceptionHook Off</code></td></tr>
100<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
101<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
102<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
103<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.0.49 以降</td></tr>
104</table>
105    <p>安全上の理由から、<code>--enable-exception-hook</code> configure
106    オプションを有効にした場合にのみ、このディレクティブを利用できます。
107    外部モジュールをプラグインして、子がクラッシュした後に何か実行できるような
108    フックを有効にします。</p>
109    
110    <p>このような外部モジュールは、既に二つ存在していて、
111    <code>mod_whatkilledus</code> と <code>mod_backtrace</code>
112    がこのフックを活用します。これらの詳細については Jeff Trawick 
113    さんの <a href="http://www.apache.org/~trawick/exception_hook.html">EnableExceptionHook site</a> を参照してください。</p>
114
115</div>
116<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
117<div class="directive-section"><h2><a name="GracefulShutdownTimeout" id="GracefulShutdownTimeout">GracefulShutdownTimeout</a> <a name="gracefulshutdowntimeout" id="gracefulshutdowntimeout">ディレクティブ</a></h2>
118<table class="directive">
119<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>穏やかな停止をかけた後、終了するまで待つ時間</td></tr>
120<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>GracefulShutDownTimeout <var>seconds</var></code></td></tr>
121<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>GracefulShutDownTimeout 0</code></td></tr>
122<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
123<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
124<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/event.html">event</a></code></td></tr>
125<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.2 以降</td></tr>
126</table>
127    <p><code class="directive">GracefulShutdownTimeout</code> には
128    サーバーが "graceful-stop" シグナルを受け取ってから現在の
129    リクエストの処理を最大で何秒間続けるかを指定します。</p>
130
131    <p>この値をゼロに設定すると、処理中として残っているリクエストが
132    全て完了するまでサーバーは終了しません。</p>
133
134</div>
135<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
136<div class="directive-section"><h2><a name="Listen" id="Listen">Listen</a> <a name="listen" id="listen">ディレクティブ</a></h2>
137<table class="directive">
138<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバが listen するIP アドレスとポート番号</td></tr>
139<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</code></td></tr>
140<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
141<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
142<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/event.html">event</a></code></td></tr>
143<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 から必須ディレクティブ。<var>protocol</var>
144引数は 2.1.5 で追加。</td></tr>
145</table>
146    <p><code class="directive">Listen</code> ディレクティブは Apache
147    が特定の IP アドレスやポート番号だけを listen するように指定します。
148    デフォルトでは全ての IP インターフェースのリクエストに応答します。
149    <code class="directive">Listen</code> ディレクティブは
150    現在は必須のディレクティブとなりました。
151    もし設定ファイルになければ、サーバは起動に失敗します。
152    これは以前のバージョンの Apache から変更のあった部分です。</p>
153
154    <p><code class="directive">Listen</code> ディレクティブでは、特定のポートあるいは
155    アドレスとポートの組み合わせから入ってくるリクエストに対して
156    応答するように指定します。
157    もしポート番号だけが指定された場合は、サーバは全インターフェースの
158    指定されたポート番号に対して listen します。
159    IP アドレスがポートとともに指定された場合は、
160    サーバは指定されたポートとインターフェースに対して listen 
161    します。</p>
162
163    <p>複数のアドレスとポートに対して listen するように、
164    複数の <code class="directive">Listen</code> ディレクティブを使うこともできます。
165    サーバは列挙されたアドレスとポート全てからのリクエストに対して
166    応答します。</p>
167
168    <p>例えば、サーバが 80 番ポートと 8000 番ポートの両方の
169    コネクションを受け入れる場合は、次のようにします。</p>
170
171    <div class="example"><p><code>
172       Listen 80<br />
173       Listen 8000
174    </code></p></div>
175
176    <p>二つの特定のインターフェースとポート番号からのコネクションを
177    受け入れるようにするには、次のようにします。</p>
178
179    <div class="example"><p><code>
180       Listen 192.170.2.1:80<br />
181       Listen 192.170.2.5:8000
182    </code></p></div>
183
184    <p>IPv6 アドレスは角括弧で囲まなければなりません。
185    例えば次の例のようにです。</p>
186
187    <div class="example"><p><code>
188       Listen [2001:db8::a00:20ff:fea7:ccea]:80
189    </code></p></div>
190
191    <p><var>protocol</var> オプション引数は通常の設定では必要ありません。
192       無指定の場合、443 番ポートには <code>https</code> が、他のポートには
193       <code>http</code> がデフォルト値として使用されます。
194       protocol 指定は、どのモジュールがリクエストを処理するかを決定し、
195       <code class="directive"><a href="/mod/core.html#acceptfilter">AcceptFilter</a></code> 
196       によるプロトコル特有の最適化を行うようにします。</p>
197
198    <p>非標準なポートで運用している際にのみ protocol 指定が必要になります。
199       たとえば <code>https</code> なサイトを 8443 番ポートで運用している場合 :</p>
200
201    <div class="example"><p><code>
202      Listen 192.170.2.1:8443 https
203    </code></p></div>
204
205    <div class="note"><h3>エラー条件</h3>
206      同一 IP アドレスとポートの組に、複数の <code class="directive">Listen</code> 
207      ディレクティブを指定してしまうと、<code>Address already in use</code> 
208      というエラーメッセージを受けることになります。
209    </div>
210
211
212<h3>参照</h3>
213<ul>
214<li><a href="/dns-caveats.html">DNS の問題</a></li>
215<li><a href="/bind.html">Apache
216が使用するアドレスとポートの設定</a></li>
217</ul>
218</div>
219<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
220<div class="directive-section"><h2><a name="ListenBackLog" id="ListenBackLog">ListenBackLog</a> <a name="listenbacklog" id="listenbacklog">ディレクティブ</a></h2>
221<table class="directive">
222<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>保留状態のコネクションのキューの最大長</td></tr>
223<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ListenBacklog <var>backlog</var></code></td></tr>
224<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ListenBacklog 511</code></td></tr>
225<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
226<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
227<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
228</table>
229    <p>保留状態のコネクションのキューの最大長です。
230    一般的には調整する必要はありませんし、調整は望ましくありません。
231    しかし、TCP SYN フラッドアタックの状況下におかれる場合に、
232    増やした方が望ましいシステムもあります。
233    <code>listen(2)</code> システムコールのバックログパラメータを
234    ご覧下さい。</p>
235
236    <p>この値は OS により、小さな数に抑えられます。
237    値は OS 毎に異なっています。また多くの OS では、
238    バックログとして指定されている値ちょうどまで使っているわけではなく、
239    設定されている値に基づいて (通常は設定値よりも大きな値を)
240    使っていることに注意してください。</p>
241
242</div>
243<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
244<div class="directive-section"><h2><a name="MaxConnectionsPerChild" id="MaxConnectionsPerChild">MaxConnectionsPerChild</a> <a name="maxconnectionsperchild" id="maxconnectionsperchild">ディレクティブ</a></h2>
245<table class="directive">
246<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Limit on the number of connections that an individual child server
247will handle during its life</td></tr>
248<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxConnectionsPerChild <var>number</var></code></td></tr>
249<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxConnectionsPerChild 0</code></td></tr>
250<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
251<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
252<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/event.html">event</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
253<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available Apache HTTP Server 2.3.9 and later. The old name
254<code>MaxRequestsPerChild</code> is still supported.</td></tr>
255</table><p>このディレクティブの解説文書は
256            まだ翻訳されていません。英語版をご覧ください。
257            </p></div>
258<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
259<div class="directive-section"><h2><a name="MaxMemFree" id="MaxMemFree">MaxMemFree</a> <a name="maxmemfree" id="maxmemfree">ディレクティブ</a></h2>
260<table class="directive">
261<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>free()</code> が呼ばれない限り、
262主メモリアロケータが保持し続けられるメモリの最大量</td></tr>
263<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxMemFree <var>KBytes</var></code></td></tr>
264<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxMemFree 0</code></td></tr>
265<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
266<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
267<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code></td></tr>
268</table>
269    <p><code class="directive">MaxMemFree</code> ディレクティブは
270    <code>free()</code> が呼ばれない限り、
271    主アロケータが保持できる空のメモリの最大値をキロバイト単位で設定します。
272    設定されていないか、零に設定されているときは、無制限になります。</p>
273
274</div>
275<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
276<div class="directive-section"><h2><a name="MaxRequestWorkers" id="MaxRequestWorkers">MaxRequestWorkers</a> <a name="maxrequestworkers" id="maxrequestworkers">ディレクティブ</a></h2>
277<table class="directive">
278<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Maximum number of connections that will be processed
279simultaneously</td></tr>
280<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxRequestWorkers <var>number</var></code></td></tr>
281<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>See usage for details</code></td></tr>
282<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
283<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
284<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/event.html">event</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
285</table><p>このディレクティブの解説文書は
286            まだ翻訳されていません。英語版をご覧ください。
287            </p></div>
288<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
289<div class="directive-section"><h2><a name="MaxSpareThreads" id="MaxSpareThreads">MaxSpareThreads</a> <a name="maxsparethreads" id="maxsparethreads">ディレクティブ</a></h2>
290<table class="directive">
291<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>アイドルスレッドの最大数</td></tr>
292<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxSpareThreads <var>number</var></code></td></tr>
293<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用法をご覧下さい。</code></td></tr>
294<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
295<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
296<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
297</table>
298    <p>アイドルなスレッドの最大数です。異なる MPM ではそれぞれ、
299    このディレクティブは異なる取り扱われ方をされます。</p>
300
301    <p><code class="module"><a href="/mod/perchild.html">perchild</a></code> では、
302    デフォルトは <code>MaxSpareThreads 10</code> です。
303    この MPM はアイドルスレッド数を、それぞれの子プロセスごとに監視します。
304    子プロセスにアイドルスレッドが多すぎる場合は、
305    サーバはその子プロセスに含まれるスレッドを終了し始めます。</p>
306
307    <p><code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>,
308    <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> では、
309    デフォルトは <code>MaxSpareThreads 250</code> です。
310    この MPM はアイドルスレッド数をサーバ全体で監視します。
311    サーバでアイドルスレッド数が多すぎる場合は、
312    この数字よりも少ない数になるまで子プロセスを終了します。</p>
313
314    <p><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> では、
315    デフォルトは <code>MaxSpareThreads 100</code> です。
316    この MPM はシングルプロセスで実行されますので、
317    スペアスレッド数もサーバ全体で勘定します。</p>
318
319    <p><code class="module"><a href="/mod/beos.html">beos</a></code> と <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> は
320    <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> と似た挙動をします。
321    <code class="module"><a href="/mod/beos.html">beos</a></code> でのデフォルト値は <code>MaxSpareThreads 50</code>
322    です。<code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> でのデフォルト値は <code>10</code>
323    です。</p>
324
325    <div class="note"><h3>制限事項</h3>
326      <p><code class="directive">MaxSpareThreads</code> の取る値には制限があります。
327      Apache は次の規則に従って自動的に補正します。</p>
328      <ul>
329        <li><code class="module"><a href="/mod/perchild.html">perchild</a></code> では、
330        <code class="directive">MaxSpareThreads</code> が
331        <code class="directive"><a href="#threadlimit">ThreadLimit</a></code>
332        と等しいかそれ以下である必要があります。</li>
333
334        <li><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> は
335        <code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code>
336        よりも大きい必要があります。</li>
337
338        <li><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, 
339        <code class="module"><a href="/mod/worker.html">worker</a></code> では、
340        <code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code> と
341        <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
342        で決まる総和と等しいか大きい必要があります。</li>
343      </ul>
344    </div>
345
346<h3>参照</h3>
347<ul>
348<li><code class="directive"><a href="#minsparethreads">MinSpareThreads</a></code></li>
349<li><code class="directive"><a href="#startservers">StartServers</a></code></li>
350</ul>
351</div>
352<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
353<div class="directive-section"><h2><a name="MinSpareThreads" id="MinSpareThreads">MinSpareThreads</a> <a name="minsparethreads" id="minsparethreads">ディレクティブ</a></h2>
354<table class="directive">
355<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストに応答することのできる
356アイドルスレッド数の最小数</td></tr>
357<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MinSpareThreads <var>number</var></code></td></tr>
358<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法をご覧下さい。</code></td></tr>
359<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
360<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
361<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
362</table>
363    <p>リクエストに応答するスレッド数の最小値です。
364    異なる MPM ではそれぞれ、
365    このディレクティブは異なる取り扱われ方をします。</p>
366
367    <p><code class="module"><a href="/mod/perchild.html">perchild</a></code> では、
368    デフォルトは <code>MinSpareThreads 5</code> で、
369    アイドルスレッド数を子プロセス毎に監視します。
370    もし子プロセスに十分な数のスレッドがなければ、
371    サーバはその子プロセスに新しいスレッドを作り始めます。
372    ですから、<code class="directive"><a href="/mod/perchild.html#numservers">NumServers</a></code>
373    を <code>10</code> に、<code class="directive">MinSpareThreads</code> を
374    <code>5</code> にした場合は、最小でも 50 のアイドルスレッドが
375    システム上にあることになります。</p>
376
377    <p><code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>,
378    <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> では、
379    デフォルトは <code>MinSpareThreads 75</code> で、
380    アイドルスレッド数をサーバ全体で監視します。
381    もしサーバに十分な数のアイドルスレッドがなければ、
382    アイドルスレッド数がこの数 <var>number</var> よりも大きくなるまで
383    新しい子プロセスが生成されます。</p>
384
385    <p><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> では、
386    デフォルトは <code>MinSpareThreads 10</code> で、
387    シングルプロセス MPM ですので、サーバ全体で管理されます。</p>
388
389    <p><code class="module"><a href="/mod/beos.html">beos</a></code> と <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> は、
390    <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>によく似ています。
391    <code class="module"><a href="/mod/beos.html">beos</a></code> でのデフォルトは <code>MinSpareThreads 1</code>
392    です。<code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> でのデフォルトは
393    <code>5</code> です。</p>
394
395<h3>参照</h3>
396<ul>
397<li><code class="directive"><a href="#maxsparethreads">MaxSpareThreads</a></code></li>
398<li><code class="directive"><a href="#startservers">StartServers</a></code></li>
399</ul>
400</div>
401<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
402<div class="directive-section"><h2><a name="PidFile" id="PidFile">PidFile</a> <a name="pidfile" id="pidfile">ディレクティブ</a></h2>
403<table class="directive">
404<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>デーモンのプロセス ID
405をサーバが記録するためのファイル</td></tr>
406<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>PidFile <var>filename</var></code></td></tr>
407<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>PidFile logs/httpd.pid</code></td></tr>
408<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
409<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
410<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
411</table>
412    <p><code class="directive">PidFile</code> ディレクティブで、
413    デーモンのプロセス ID をサーバが記録するファイルを設定します。
414    ファイル名が絶対パスでない場合は、
415    <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code>
416    からの相対的なものとして扱われます。</p>
417
418    <div class="example"><h3>例</h3><p><code>
419    PidFile /var/run/apache.pid
420    </code></p></div>
421
422    <p>サーバが <code class="directive"><a href="/mod/core.html#errorlog">ErrorLog</a></code>
423    や <code class="directive"><a href="/mod/mod_log_config.html#transferlog">TransferLog</a></code>
424    を閉じて開き直したり、設定ファイルを
425    再読込したりさせるために、サーバにシグナルを送ることができると
426    便利なことがあります。
427    これは SIGHUP (kill -1) シグナルを <code class="directive">PidFile</code>
428    に書かれているプロセス ID に送ることでできます。</p>
429
430    <p><code class="directive">PidFile</code> には、ログファイルの設置位置や
431    <a href="/misc/security_tips.html#serverroot">セキュリティ</a>
432    と全く同じ注意点があります。</p>
433
434    <div class="note"><h3>注意</h3>
435      <p>Apache 2 では、
436      <code class="program"><a href="/programs/apachectl.html">apachectl</a></code>
437      スクリプトのみを使用してサーバの (再) 起動や停止を
438      行なうことを推奨しています。</p>
439    </div>
440
441</div>
442<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
443<div class="directive-section"><h2><a name="ReceiveBufferSize" id="ReceiveBufferSize">ReceiveBufferSize</a> <a name="receivebuffersize" id="receivebuffersize">ディレクティブ</a></h2>
444<table class="directive">
445<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>TCP 受信バッファサイズ</td></tr>
446<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ReceiveBufferSize <var>bytes</var></code></td></tr>
447<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ReceiveBufferSize 0</code></td></tr>
448<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
449<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
450<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
451</table>
452    <p>サーバは TCP 受信バッファサイズを指定されたバイト数に設定します。</p>
453
454    <p><code>0</code>にした場合、OS のデフォルト値が使用されます。</p>
455
456</div>
457<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
458<div class="directive-section"><h2><a name="ScoreBoardFile" id="ScoreBoardFile">ScoreBoardFile</a> <a name="scoreboardfile" id="scoreboardfile">ディレクティブ</a></h2>
459<table class="directive">
460<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>子プロセスと連携するためのデータを保存する
461ファイルの位置</td></tr>
462<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ScoreBoardFile <var>file-path</var></code></td></tr>
463<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ScoreBoardFile logs/apache_status</code></td></tr>
464<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
465<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
466<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
467</table>
468    <p>Apache は親プロセスと子プロセス間の通信にスコアボードを用います。
469    この通信機能にファイルを必要とするアーキテクチャもあります。
470    ファイルが指定されていなければ、Apache はまずメモリ上
471    (匿名共有メモリ) にスコアボードを作ろうとし、それが失敗すると
472    ディスク上にファイル (ファイルベースの共有メモリ) を作ろうとします。
473    このディレクティブを指定すると、Apache
474    は必ずディスクにファイルを生成します。</p>
475
476    <div class="example"><h3>例</h3><p><code>
477      ScoreBoardFile /var/run/apache_status
478    </code></p></div>
479
480    <p>ファイルベースの共有メモリは、サードパーティー製のアプリケーションで
481    スコアボードに直接アクセスする必要がある場合に役に立ちます。</p>
482
483    <p><code class="directive">ScoreBoardFile</code> を使う場合、
484    RAM ディスク上に置くとスピードが向上するでしょう。
485    しかし、ログファイルの設置位置や
486    <a href="/misc/security_tips.html">セキュリティ</a>
487    と同様の注意点があるので、注意してください。</p>
488
489<h3>参照</h3>
490<ul>
491<li><a href="/stopping.html">Apache の停止と再起動</a></li>
492</ul>
493</div>
494<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
495<div class="directive-section"><h2><a name="SendBufferSize" id="SendBufferSize">SendBufferSize</a> <a name="sendbuffersize" id="sendbuffersize">ディレクティブ</a></h2>
496<table class="directive">
497<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>TCP バッファサイズ</td></tr>
498<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SendBufferSize <var>bytes</var></code></td></tr>
499<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SendBufferSize 0</code></td></tr>
500<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
501<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
502<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
503</table>
504    <p>サーバは TCP 送信バッファサイズを指定されたバイト数に設定します。
505    高速で高レイテンシな環境で
506    (<em>例</em> 100ms 程度、大陸横断高速通信路など)
507    古い一般的な OS のデフォルト値を増やすのに非常に便利です。</p>
508
509    <p><code>0</code>にした場合、OS のデフォルト値が使用されます。</p>
510
511</div>
512<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
513<div class="directive-section"><h2><a name="ServerLimit" id="ServerLimit">ServerLimit</a> <a name="serverlimit" id="serverlimit">ディレクティブ</a></h2>
514<table class="directive">
515<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>設定可能なサーバプロセス数の上限</td></tr>
516<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerLimit <var>number</var></code></td></tr>
517<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用法を参照</code></td></tr>
518<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
519<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
520<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
521</table>
522    <p><code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM の場合は、このディレクティブは
523    Apache プロセス稼働中における
524    <code class="directive"><a href="#maxclients">MaxClients</a></code>
525    に設定可能な上限値を設定することになります
526    <span class="transnote">(<em>訳注:</em> prefork の場合は同時クライアント数 = サーバプロセス数なので)</span>。
527    <code class="module"><a href="/mod/worker.html">worker</a></code> MPM の場合には、このディレクティブは
528    <code class="directive"><a href="#threadlimit">ThreadLimit</a></code>
529    ディレクティブと組み合わせて、
530    Apache プロセス稼働中における
531    <code class="directive"><a href="#maxclients">MaxClients</a></code>
532    に設定可能な上限値を設定することになります。
533    このディレクティブを変更して再起動<span class="transnote">(<em>訳注:</em> apachectl
534    restart)</span>しても無視されますが、
535    <code class="directive"><a href="#maxclients">MaxClients</a></code>
536    は再起動で変更することができます。
537    </p>
538
539    <p>このディレクティブを使用する際は特に注意してください。
540    <code class="directive">ServerLimit</code> が必要以上に大きな値に
541    設定された場合は、余計な未使用共有メモリが割り当てられます。
542    <code class="directive">ServerLimit</code> と
543    <code class="directive"><a href="#maxclients">MaxClients</a></code>
544    がシステムの扱える範囲を越えた設定値になっていると、
545    Apache は起動しないか、起動しても不安定になるでしょう。</p>
546
547    <p><code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM では、
548    <code class="directive"><a href="#maxclients">MaxClients</a></code>
549    を 256 (デフォルト) よりも大きな値に設定する必要がある時にだけ使用してください。
550    希望の <code class="directive"><a href="#maxclients">MaxClients</a></code>
551    数とくらべて、必要以上に大きな値を指定することは避けてください。</p>
552
553    <p><code class="module"><a href="/mod/worker.html">worker</a></code>, <code class="module"><a href="/mod/leader.html">leader</a></code>, 
554    <code class="module"><a href="/mod/threadpool.html">threadpool</a></code> MPM では、
555    <code class="directive"><a href="#maxclients">MaxClients</a></code> と
556    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
557    の設定で 16 サーバプロセス (デフォルト) 
558    以上必要になる場合にのみ使用してください。希望の
559    <code class="directive"><a href="#maxclients">MaxClients </a></code> と
560    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
561    とくらべて、必要となるサーバプロセス数以上に大きな値を
562    設定することは避けてください。</p>
563
564    <p><code class="module"><a href="/mod/perchild.html">perchild</a></code> MPM では、
565    <code class="directive"><a href="/mod/perchild.html#numservers">NumServers</a></code> を 8 (デフォルト)
566    よろいも大きな値に設定する必要があるときにのみ使用してください。</p>
567
568    <div class="note"><h3>注意</h3>
569      <p><code>ServerLimit 20000</code> という制限付きでコンパイルされています
570      (<code class="module"><a href="/mod/prefork.html">prefork</a></code> MPM では <code>200000</code>) 。
571      これはスペルミスによって誤って酷い状況になるのを、
572      回避するための処置です。</p>
573    </div>
574
575<h3>参照</h3>
576<ul>
577<li><a href="/stopping.html">Apache の停止と再起動</a></li>
578</ul>
579</div>
580<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
581<div class="directive-section"><h2><a name="StartServers" id="StartServers">StartServers</a> <a name="startservers" id="startservers">ディレクティブ</a></h2>
582<table class="directive">
583<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時に生成される子サーバプロセスの数</td></tr>
584<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>StartServers <var>number</var></code></td></tr>
585<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
586<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
587<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
588<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="/mod/prefork.html">prefork</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
589</table>
590    <p><code class="directive">StartServers</code> ディレクティブは、
591    起動時に生成される子サーバプロセスの数を設定します。
592    プロセス数は負荷に応じて動的に制御されますので、
593    通常はこの値を調整する理由はあまりないでしょう。</p>
594
595    <p>デフォルト値は MPM ごとに異なります。
596    <code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, 
597    <code class="module"><a href="/mod/worker.html">worker</a></code> は <code>StartServers 3</code> です。
598    <code class="module"><a href="/mod/prefork.html">prefork</a></code> は <code>5</code> で、
599    <code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code> は <code>2</code> です。</p>
600
601</div>
602<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
603<div class="directive-section"><h2><a name="StartThreads" id="StartThreads">StartThreads</a> <a name="startthreads" id="startthreads">ディレクティブ</a></h2>
604<table class="directive">
605<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時に生成されるスレッドの数</td></tr>
606<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>StartThreads <var>number</var></code></td></tr>
607<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
608<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
609<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
610<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/beos.html">beos</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code></td></tr>
611</table>
612    <p>起動時に生成されるスレッドの数です。
613    スレッド数は負荷に応じて動的に制御されますので、
614    通常はこの値を調整する理由はあまりないでしょう。</p>
615
616    <p><code class="module"><a href="/mod/perchild.html">perchild</a></code> でのデフォルトは
617    <code>StartThreads 5</code> で、このディレクティブは起動時に
618    プロセス毎のスレッド数を追跡します。</p>
619
620    <p><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code> でのデフォルトは
621    <code>StartThreads 50</code> で、
622    この場合プロセスは一つしかないので、
623    起動時にリクエストに応答するスレッドの総数となります。</p>
624
625    <p><code class="module"><a href="/mod/beos.html">beos</a></code> でのデフォルトは <code>StartThreads
626    10</code> です。
627    また、起動時に生成されるスレッドの総数にも反映されます。</p>
628
629</div>
630<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
631<div class="directive-section"><h2><a name="ThreadLimit" id="ThreadLimit">ThreadLimit</a> <a name="threadlimit" id="threadlimit">ディレクティブ</a></h2>
632<table class="directive">
633<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>設定可能な子プロセス毎のスレッド数の上限を
634設定します</td></tr>
635<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadLimit <var>number</var></code></td></tr>
636<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
637<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
638<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
639<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
640<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.41 とそれ以降の <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> 
641で利用可能</td></tr>
642</table>
643    <p>このディレクティブは
644    Apache プロセス稼働中における
645    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
646    に設定可能な上限値を設定します。再起動時にこのディレクティブの値を
647    変更しても無視されますが、
648    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
649    は再起動中に、このディレクティブで指定された上限値まで
650    変更することができます。</p>
651
652    <p>このディレクティブを使用する際は特に注意してください。
653    <code class="directive">ThreadLimit</code> が
654    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
655    よりもずっと大きな値に設定された場合は、
656    余計な未使用共有メモリが割り当てられてしまいます。
657    <code class="directive">ThreadLimit</code> が
658    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>
659    の両方がシステムの扱える範囲を超えている場合は、
660    Apache は起動しないか、起動したとしても不安定になるでしょう。
661    このディレクティブの値は今使用している Apache の <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code> の予想上限値を
662    超えた値には設定しないでください。
663    </p>
664
665    <p><code class="directive">ThreadLimit</code> のデフォルト値は
666    <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> のときは <code>1920</code> で、
667    他の場合は <code>64</code> です。</p>
668
669    <div class="note"><h3>注意</h3>
670      <p><code>ThreadLimit 20000</code> (<code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>
671      の場合は <code>ThreadLimit 15000</code> )
672      という制限付きでコンパイルされています。
673      これはスペルミスによって誤って酷い状況になるのを、
674      回避するための処置です。</p>
675    </div>
676
677</div>
678<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
679<div class="directive-section"><h2><a name="ThreadsPerChild" id="ThreadsPerChild">ThreadsPerChild</a> <a name="threadsperchild" id="threadsperchild">ディレクティブ</a></h2>
680<table class="directive">
681<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>子プロセスそれぞれに生成されるスレッド数</td></tr>
682<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadsPerChild <var>number</var></code></td></tr>
683<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>詳細は使用方法を参照</code></td></tr>
684<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
685<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
686<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
687</table>
688    <p>このディレクティブは、それぞれの子プロセスで生成される
689    スレッド数を設定します。
690    子プロセスは開始時にこれらのスレッドを生成して、
691    その後は生成しません。<code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> のような、
692    子プロセスが一つしかないような MPM を利用しているのであれば、
693    この値はサーバの負荷全体を十分取り扱える程度に、
694    大きくなければなりません。<code class="module"><a href="/mod/worker.html">worker</a></code> のような、
695    子プロセスが複数あるような MPM を利用しているのであれば、
696    サーバの通常負荷を十分扱える程度に、
697    <em>スレッド総数</em>が多くなければなりません。</p>
698
699    <p><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>での <code class="directive">ThreadsPerChild</code>
700    のデフォルト値は <code>64</code> で、他の場合は
701    <code>25</code> です。</p>
702
703</div>
704<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
705<div class="directive-section"><h2><a name="ThreadStackSize" id="ThreadStackSize">ThreadStackSize</a> <a name="threadstacksize" id="threadstacksize">ディレクティブ</a></h2>
706<table class="directive">
707<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントのコネクションを受け持つスレッドが使用する
708スタックのバイト数</td></tr>
709<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ThreadStackSize <var>size</var></code></td></tr>
710<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>NetWare では 65536。他の OS では違った値</code></td></tr>
711<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
712<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>MPM</td></tr>
713<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td><code class="module"><a href="/mod/leader.html">leader</a></code>, <code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="/mod/perchild.html">perchild</a></code>, <code class="module"><a href="/mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="/mod/worker.html">worker</a></code></td></tr>
714<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.1 以降</td></tr>
715</table>
716    <p>クライアントコネクションを受け持ち、コネクション処理に必要なモジュールの
717    呼び出しを行なっているスレッドの、(自動変数用の) スタックサイズは
718    <code class="directive">ThreadStackSize</code> ディレクティブで指定します。
719    大抵の場合 OS の指定しているスタックサイズのデフォルト値は
720    適切なものですが、調整が必要になる場合もあります:</p>
721
722    <ul>
723      <li>スレッドスタックサイズのデフォルト値が比較的小さく設定されている
724      プラットホーム (例えば HP-UX) では、自動変数用の領域で大きな容量を
725      使用するサードパーティ製モジュールのために Apache がクラッシュする
726      場合もあります。そのモジュールは他のプラットホームでは
727      スタックサイズが大きいために、快調に動作するかもしれません。
728      このタイプのクラッシュは、<code class="directive">ThreadStackSize</code>
729      で OS のデフォルト値より大きな値を指定することで解決します。
730      サードパーティ製モジュールでこの処置が必要であると記載されている
731      場合か、Apache の出力するメッセージでスレッドスタックサイズが
732      小さすぎると指摘されている場合にのみ、この調整をしてください。</li>
733
734      <li>デフォルトスレッドスタックサイズが、Web サーバ用途に必要な量よりも
735      明らかに大きすぎる場合、<code class="directive">ThreadStackSize</code> 
736      を OS のデフォルト値よりも小さな値にすることで、子プロセスあたりの
737      スレッド数をより多く持たせられるようになります。
738      このタイプの調整は、テスト環境でウェブサーバを完全に
739      テストできる場合に限って行なうべきです。
740      まれに多数のスタックが要求されるリクエストを受けることがあるかも
741      しれないからです。
742      Web サーバの設定を変更すると、現在の <code class="directive">ThreadStackSize</code> 
743      の設定が取り消される場合があります。</li>
744    </ul>
745
746</div>
747</div>
748<div class="bottomlang">
749<p><span>翻訳済み言語: </span><a href="/de/mod/mpm_common.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
750<a href="/en/mod/mpm_common.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
751<a href="/fr/mod/mpm_common.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
752<a href="/ja/mod/mpm_common.html" title="Japanese">&nbsp;ja&nbsp;</a> |
753<a href="/tr/mod/mpm_common.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
754</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
755<script type="text/javascript"><!--//--><![CDATA[//><!--
756var comments_shortname = 'httpd';
757var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mpm_common.html';
758(function(w, d) {
759    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
760        d.write('<div id="comments_thread"><\/div>');
761        var s = d.createElement('script');
762        s.type = 'text/javascript';
763        s.async = true;
764        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
765        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
766    }
767    else { 
768        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
769    }
770})(window, document);
771//--><!]]></script></div><div id="footer">
772<p class="apache">Copyright 2014 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
773<p class="menu"><a href="/mod/">モジュール</a> | <a href="/mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">用語</a> | <a href="/sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
774if (typeof(prettyPrint) !== 'undefined') {
775    prettyPrint();
776}
777//--><!]]></script>
778</body></html>