1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Passenger: Passenger::PoolOptions Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespacePassenger.html">Passenger</a>::<a class="el" href="structPassenger_1_1PoolOptions.html">PoolOptions</a>
</div>
</div>
<div class="contents">
<h1>Passenger::PoolOptions Struct Reference</h1><!-- doxytag: class="Passenger::PoolOptions" -->This struct encapsulates information for ApplicationPool::get() and for <a class="el" href="classPassenger_1_1SpawnManager.html#88a94ba4d41dab492cb1dc8a0f998973" title="Spawn a new application process.">SpawnManager::spawn()</a>, such as which application is to be spawned.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="PoolOptions_8h-source.html">PoolOptions.h</a>></code>
<p>
<p>
<a href="structPassenger_1_1PoolOptions-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#b2b7c72144c108657e3ad4ac9f6e26f4">PoolOptions</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object with the default values filled in. <a href="#b2b7c72144c108657e3ad4ac9f6e26f4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3e80ba601729a1a1eedc33cbc2217949"></a><!-- doxytag: member="Passenger::PoolOptions::PoolOptions" ref="3e80ba601729a1a1eedc33cbc2217949" args="(const string &appRoot, string appGroupName="", const string &appType="rails", const string &environment="production", const string &spawnMethod="smart-lv2", const string &user="", const string &group="", const string &defaultUser="", const string &defaultGroup="", long frameworkSpawnerTimeout=-1, long appSpawnerTimeout=-1, const string &baseURI="/", unsigned long maxRequests=0, unsigned long minProcesses=0, bool useGlobalQueue=false, unsigned long statThrottleRate=0, const string &restartDir="", Account::Rights rights=DEFAULT_BACKEND_ACCOUNT_RIGHTS, const AnalyticsLogPtr &log=AnalyticsLogPtr())" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#3e80ba601729a1a1eedc33cbc2217949">PoolOptions</a> (const string &<a class="el" href="structPassenger_1_1PoolOptions.html#822039d204b48d9ed49184646734acf3">appRoot</a>, string <a class="el" href="structPassenger_1_1PoolOptions.html#dce57f30c4f33d8b55726d0eaa15addf">appGroupName</a>="", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#5e1c129ae0b8be350c7ed238eec8a8c9">appType</a>="rails", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#4324bb724859905f9991faa9b90aedbc">environment</a>="production", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#feb629e3ced79f5a2dbccc1beeeeab9e">spawnMethod</a>="smart-lv2", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#7bb617271b0a61645b17b9815ebf300c">user</a>="", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#6292899199727c513fd641d313c42372">group</a>="", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#f9e15d356066ebd5f1454dca7937374f">defaultUser</a>="", const string &<a class="el" href="structPassenger_1_1PoolOptions.html#fdbe6d3418132ff3ca17427778e0948c">defaultGroup</a>="", long <a class="el" href="structPassenger_1_1PoolOptions.html#cbbea86958b42ffa7989680ed1587c70">frameworkSpawnerTimeout</a>=-1, long <a class="el" href="structPassenger_1_1PoolOptions.html#5a2f27a853e33c22da71430216d798cf">appSpawnerTimeout</a>=-1, const string &<a class="el" href="structPassenger_1_1PoolOptions.html#85c99df1b3d74b47c73049e20f0a7192">baseURI</a>="/", unsigned long <a class="el" href="structPassenger_1_1PoolOptions.html#70251ed3cb3713cb26a0b166c6b015c0">maxRequests</a>=0, unsigned long <a class="el" href="structPassenger_1_1PoolOptions.html#9d887031bbee2ad75ed88c8533ce41c1">minProcesses</a>=0, bool <a class="el" href="structPassenger_1_1PoolOptions.html#b610e568a7b5d3bb27460d6e35952b7e">useGlobalQueue</a>=false, unsigned long <a class="el" href="structPassenger_1_1PoolOptions.html#eaf5a998b4a5da2246685c2dfb8a8c6d">statThrottleRate</a>=0, const string &<a class="el" href="structPassenger_1_1PoolOptions.html#b0f889f70a3ed22f2423d110ddaf26f5">restartDir</a>="", Account::Rights <a class="el" href="structPassenger_1_1PoolOptions.html#45665fffc8a20ea60a3fcafaff8627ab">rights</a>=DEFAULT_BACKEND_ACCOUNT_RIGHTS, const AnalyticsLogPtr &<a class="el" href="structPassenger_1_1PoolOptions.html#ce54185a9981f103a036a7ac3e768612">log</a>=AnalyticsLogPtr())</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object with the given values. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#0caa024c33da2f68b5c79b41122397b3">PoolOptions</a> (const vector< string > &vec, unsigned int startIndex=0, AnalyticsLoggerPtr analyticsLogger=AnalyticsLoggerPtr())</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object from the given string vector. <a href="#0caa024c33da2f68b5c79b41122397b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#437e077b0ab037f4e86680e9164a694e">toVector</a> (vector< string > &vec, bool storeEnvVars=true) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Append the information in this <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object to the given string vector. <a href="#437e077b0ab037f4e86680e9164a694e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#43eb2294bff16bbcbafec569babca883">getAppGroupName</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the app group name. <a href="#43eb2294bff16bbcbafec569babca883"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#cb2df1a0b558e7fa457e46373c17b679">serializeEnvironmentVariables</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Serializes the items in environmentVariables into a string, which can be used to create a SimpleStringListCreator object. <a href="#cb2df1a0b558e7fa457e46373c17b679"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#822039d204b48d9ed49184646734acf3">appRoot</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The root directory of the application to spawn. <a href="#822039d204b48d9ed49184646734acf3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#dce57f30c4f33d8b55726d0eaa15addf">appGroupName</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A name used by ApplicationPool to uniquely identify an application. <a href="#dce57f30c4f33d8b55726d0eaa15addf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#5e1c129ae0b8be350c7ed238eec8a8c9">appType</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The application type. <a href="#5e1c129ae0b8be350c7ed238eec8a8c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#4324bb724859905f9991faa9b90aedbc">environment</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The RAILS_ENV/RACK_ENV environment that should be used. <a href="#4324bb724859905f9991faa9b90aedbc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#feb629e3ced79f5a2dbccc1beeeeab9e">spawnMethod</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Method with which application processes should be spawned. <a href="#feb629e3ced79f5a2dbccc1beeeeab9e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#7bb617271b0a61645b17b9815ebf300c">user</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See overview. <a href="#7bb617271b0a61645b17b9815ebf300c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#6292899199727c513fd641d313c42372">group</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See class overview. <a href="#6292899199727c513fd641d313c42372"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#f9e15d356066ebd5f1454dca7937374f">defaultUser</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See class overview. <a href="#f9e15d356066ebd5f1454dca7937374f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#fdbe6d3418132ff3ca17427778e0948c">defaultGroup</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See class overview. <a href="#fdbe6d3418132ff3ca17427778e0948c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#cbbea86958b42ffa7989680ed1587c70">frameworkSpawnerTimeout</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The idle timeout, in seconds, of framework spawners. <a href="#cbbea86958b42ffa7989680ed1587c70"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#5a2f27a853e33c22da71430216d798cf">appSpawnerTimeout</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The idle timeout, in seconds, of application spawners. <a href="#5a2f27a853e33c22da71430216d798cf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">StringListCreatorPtr </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#aa4f5d4ae1534ada8613fbe497a38924">environmentVariables</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Environment variables which should be passed to the spawned application process. <a href="#aa4f5d4ae1534ada8613fbe497a38924"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#85c99df1b3d74b47c73049e20f0a7192">baseURI</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The base URI on which the application runs. <a href="#85c99df1b3d74b47c73049e20f0a7192"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#70251ed3cb3713cb26a0b166c6b015c0">maxRequests</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum number of requests that the spawned application may process before exiting. <a href="#70251ed3cb3713cb26a0b166c6b015c0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d887031bbee2ad75ed88c8533ce41c1"></a><!-- doxytag: member="Passenger::PoolOptions::minProcesses" ref="9d887031bbee2ad75ed88c8533ce41c1" args="" -->
unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#9d887031bbee2ad75ed88c8533ce41c1">minProcesses</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The minimum number of processes for the current group that the application pool's cleaner thread should keep around. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#b610e568a7b5d3bb27460d6e35952b7e">useGlobalQueue</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Whether to use a global queue instead of a per-backend process queue. <a href="#b610e568a7b5d3bb27460d6e35952b7e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#eaf5a998b4a5da2246685c2dfb8a8c6d">statThrottleRate</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A throttling rate for file stats. <a href="#eaf5a998b4a5da2246685c2dfb8a8c6d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#b0f889f70a3ed22f2423d110ddaf26f5">restartDir</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The directory which contains restart.txt and always_restart.txt. <a href="#b0f889f70a3ed22f2423d110ddaf26f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Account::Rights </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#45665fffc8a20ea60a3fcafaff8627ab">rights</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Any rights that the spawned application process may have. <a href="#45665fffc8a20ea60a3fcafaff8627ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">AnalyticsLogPtr </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#ce54185a9981f103a036a7ac3e768612">log</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An analytics log object to log things to. <a href="#ce54185a9981f103a036a7ac3e768612"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#1709d96d9d5d59ce79c90434a45cb076">initiateSession</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Whether the session returned by ApplicationPool::Interface::get() should be automatically initiated. <a href="#1709d96d9d5d59ce79c90434a45cb076"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structPassenger_1_1PoolOptions.html#d3d545cee2806198797fc6b4197ff87b">printExceptions</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Whether application processes should print exceptions that occurred during application initialization. <a href="#d3d545cee2806198797fc6b4197ff87b"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This struct encapsulates information for ApplicationPool::get() and for <a class="el" href="classPassenger_1_1SpawnManager.html#88a94ba4d41dab492cb1dc8a0f998973" title="Spawn a new application process.">SpawnManager::spawn()</a>, such as which application is to be spawned.
<p>
<h2>Privilege lowering support</h2>
<p>
If <em>user</em> is given and isn't the empty string, then the application process will run as the given username. Otherwise, the owner of the application's startup file (e.g. config/environment.rb or config.ru) will be used.<p>
If <em>group</em> is given and isn't the empty string, then the application process will run as the given group name. If it's set to the special value "!STARTUP_FILE!", then the startup file's group will be used. Otherwise, the primary group of the user that the application process will run as, will be used as group.<p>
If the user or group that the application process attempts to switch to doesn't exist, then <em>default_user</em> and <em>default_group</em>, respectively, will be used.<p>
Phusion <a class="el" href="namespacePassenger.html" title="A random.">Passenger</a> will attempt to avoid running the application process as root: if <em>user</em> or <em>group</em> is set to the root user or the root group, or if the startup file is owned by root, then <em>default_user</em> and <em>default_group</em> will be used instead.<p>
All this only happen if Phusion <a class="el" href="namespacePassenger.html" title="A random.">Passenger</a> has root privileges. If not, then these options have no effect. <hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="b2b7c72144c108657e3ad4ac9f6e26f4"></a><!-- doxytag: member="Passenger::PoolOptions::PoolOptions" ref="b2b7c72144c108657e3ad4ac9f6e26f4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Passenger::PoolOptions::PoolOptions </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a new <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object with the default values filled in.
<p>
One must still set appRoot manually, after having used this constructor.
</div>
</div><p>
<a class="anchor" name="0caa024c33da2f68b5c79b41122397b3"></a><!-- doxytag: member="Passenger::PoolOptions::PoolOptions" ref="0caa024c33da2f68b5c79b41122397b3" args="(const vector< string > &vec, unsigned int startIndex=0, AnalyticsLoggerPtr analyticsLogger=AnalyticsLoggerPtr())" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Passenger::PoolOptions::PoolOptions </td>
<td>(</td>
<td class="paramtype">const vector< string > & </td>
<td class="paramname"> <em>vec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>startIndex</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">AnalyticsLoggerPtr </td>
<td class="paramname"> <em>analyticsLogger</em> = <code>AnalyticsLoggerPtr()</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a new <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object from the given string vector.
<p>
This vector contains information that's written to by <a class="el" href="structPassenger_1_1PoolOptions.html#437e077b0ab037f4e86680e9164a694e" title="Append the information in this PoolOptions object to the given string vector.">toVector()</a>.<p>
For example: <div class="fragment"><pre class="fragment"> <a class="code" href="structPassenger_1_1PoolOptions.html#b2b7c72144c108657e3ad4ac9f6e26f4" title="Creates a new PoolOptions object with the default values filled in.">PoolOptions</a> options(...);
vector<string> vec;
vec.push_back(<span class="stringliteral">"my"</span>);
vec.push_back(<span class="stringliteral">"data"</span>);
options.toVector(vec); <span class="comment">// PoolOptions information will start at index 2.</span>
<a class="code" href="structPassenger_1_1PoolOptions.html#b2b7c72144c108657e3ad4ac9f6e26f4" title="Creates a new PoolOptions object with the default values filled in.">PoolOptions</a> copy(vec, 2);
</pre></div><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>vec</em> </td><td>The vector containing spawn options information. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>startIndex</em> </td><td>The index in vec at which the information starts. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>analyticsLogger</em> </td><td>If given, and the vector contains logging information, then the 'log' member will be constructed using this logger. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="43eb2294bff16bbcbafec569babca883"></a><!-- doxytag: member="Passenger::PoolOptions::getAppGroupName" ref="43eb2294bff16bbcbafec569babca883" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string Passenger::PoolOptions::getAppGroupName </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the app group name.
<p>
If there is no explicitly set app group name then the app root is considered to be the app group name.
</div>
</div><p>
<a class="anchor" name="cb2df1a0b558e7fa457e46373c17b679"></a><!-- doxytag: member="Passenger::PoolOptions::serializeEnvironmentVariables" ref="cb2df1a0b558e7fa457e46373c17b679" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string Passenger::PoolOptions::serializeEnvironmentVariables </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Serializes the items in environmentVariables into a string, which can be used to create a SimpleStringListCreator object.
<p>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Anything</em> </td><td>thrown by environmentVariables->getItems(). </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="437e077b0ab037f4e86680e9164a694e"></a><!-- doxytag: member="Passenger::PoolOptions::toVector" ref="437e077b0ab037f4e86680e9164a694e" args="(vector< string > &vec, bool storeEnvVars=true) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Passenger::PoolOptions::toVector </td>
<td>(</td>
<td class="paramtype">vector< string > & </td>
<td class="paramname"> <em>vec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>storeEnvVars</em> = <code>true</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Append the information in this <a class="el" href="structPassenger_1_1PoolOptions.html" title="This struct encapsulates information for ApplicationPool::get() and for SpawnManager::spawn()...">PoolOptions</a> object to the given string vector.
<p>
The resulting array could, for example, be used as a message to be sent to the spawn server.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>vec</em> </td><td>The vector to store the information in. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>storeEnvVars</em> </td><td>Whether to store environment variable information into vec as well. </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Anything</em> </td><td>thrown by environmentVariables->getItems(). </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="dce57f30c4f33d8b55726d0eaa15addf"></a><!-- doxytag: member="Passenger::PoolOptions::appGroupName" ref="dce57f30c4f33d8b55726d0eaa15addf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#dce57f30c4f33d8b55726d0eaa15addf">Passenger::PoolOptions::appGroupName</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A name used by ApplicationPool to uniquely identify an application.
<p>
If one tries to get() from the application pool with name "A", then get() again with name "B", then the latter will spawn a new application process, even if both get() requests have the same app root.<p>
If left empty (the default), then the app root is used as the app group name.
</div>
</div><p>
<a class="anchor" name="822039d204b48d9ed49184646734acf3"></a><!-- doxytag: member="Passenger::PoolOptions::appRoot" ref="822039d204b48d9ed49184646734acf3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#822039d204b48d9ed49184646734acf3">Passenger::PoolOptions::appRoot</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The root directory of the application to spawn.
<p>
In case of a Ruby on Rails application, this is the folder that contains 'app/', 'public/', 'config/', etc. This must be a valid directory, but the path does not have to be absolute.
</div>
</div><p>
<a class="anchor" name="5a2f27a853e33c22da71430216d798cf"></a><!-- doxytag: member="Passenger::PoolOptions::appSpawnerTimeout" ref="5a2f27a853e33c22da71430216d798cf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long <a class="el" href="structPassenger_1_1PoolOptions.html#5a2f27a853e33c22da71430216d798cf">Passenger::PoolOptions::appSpawnerTimeout</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The idle timeout, in seconds, of application spawners.
<p>
See the "Spawning methods explained" section of the users guide for information about application spawners.<p>
A timeout of 0 means that the application spawner should never idle timeout. A timeout of -1 means that the default timeout value should be used.
</div>
</div><p>
<a class="anchor" name="5e1c129ae0b8be350c7ed238eec8a8c9"></a><!-- doxytag: member="Passenger::PoolOptions::appType" ref="5e1c129ae0b8be350c7ed238eec8a8c9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#5e1c129ae0b8be350c7ed238eec8a8c9">Passenger::PoolOptions::appType</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The application type.
<p>
Either "rails" (default), "rack" or "wsgi".
</div>
</div><p>
<a class="anchor" name="85c99df1b3d74b47c73049e20f0a7192"></a><!-- doxytag: member="Passenger::PoolOptions::baseURI" ref="85c99df1b3d74b47c73049e20f0a7192" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#85c99df1b3d74b47c73049e20f0a7192">Passenger::PoolOptions::baseURI</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The base URI on which the application runs.
<p>
If the application is running on the root URI, then this value must be "/".<p>
<dl class="invariant" compact><dt><b>Invariant:</b></dt><dd>baseURI != "" </dd></dl>
</div>
</div><p>
<a class="anchor" name="fdbe6d3418132ff3ca17427778e0948c"></a><!-- doxytag: member="Passenger::PoolOptions::defaultGroup" ref="fdbe6d3418132ff3ca17427778e0948c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#fdbe6d3418132ff3ca17427778e0948c">Passenger::PoolOptions::defaultGroup</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
See class overview.
<p>
Defaults to the defaultUser's primary group.
</div>
</div><p>
<a class="anchor" name="f9e15d356066ebd5f1454dca7937374f"></a><!-- doxytag: member="Passenger::PoolOptions::defaultUser" ref="f9e15d356066ebd5f1454dca7937374f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#f9e15d356066ebd5f1454dca7937374f">Passenger::PoolOptions::defaultUser</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
See class overview.
<p>
Defaults to "nobody".
</div>
</div><p>
<a class="anchor" name="4324bb724859905f9991faa9b90aedbc"></a><!-- doxytag: member="Passenger::PoolOptions::environment" ref="4324bb724859905f9991faa9b90aedbc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#4324bb724859905f9991faa9b90aedbc">Passenger::PoolOptions::environment</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The RAILS_ENV/RACK_ENV environment that should be used.
<p>
May not be an empty string. The default is "production".
</div>
</div><p>
<a class="anchor" name="aa4f5d4ae1534ada8613fbe497a38924"></a><!-- doxytag: member="Passenger::PoolOptions::environmentVariables" ref="aa4f5d4ae1534ada8613fbe497a38924" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">StringListCreatorPtr <a class="el" href="structPassenger_1_1PoolOptions.html#aa4f5d4ae1534ada8613fbe497a38924">Passenger::PoolOptions::environmentVariables</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Environment variables which should be passed to the spawned application process.
<p>
If a new application process is started, then the getItems() method on this object will be called, which is to return environment variables that should be passed to the newly spawned backend process. Odd indices in the resulting array contain keys, even indices contain the value for the key in the previous index.<p>
May be set to NULL.<p>
<dl class="invariant" compact><dt><b>Invariant:</b></dt><dd>environmentVariables.size() is an even number. </dd></dl>
</div>
</div><p>
<a class="anchor" name="cbbea86958b42ffa7989680ed1587c70"></a><!-- doxytag: member="Passenger::PoolOptions::frameworkSpawnerTimeout" ref="cbbea86958b42ffa7989680ed1587c70" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long <a class="el" href="structPassenger_1_1PoolOptions.html#cbbea86958b42ffa7989680ed1587c70">Passenger::PoolOptions::frameworkSpawnerTimeout</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The idle timeout, in seconds, of framework spawners.
<p>
See the "Spawning methods explained" section of the users guide for information about framework spawners.<p>
A timeout of 0 means that the framework spawner should never idle timeout. A timeout of -1 means that the default timeout value should be used.
</div>
</div><p>
<a class="anchor" name="6292899199727c513fd641d313c42372"></a><!-- doxytag: member="Passenger::PoolOptions::group" ref="6292899199727c513fd641d313c42372" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#6292899199727c513fd641d313c42372">Passenger::PoolOptions::group</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
See class overview.
<p>
</div>
</div><p>
<a class="anchor" name="1709d96d9d5d59ce79c90434a45cb076"></a><!-- doxytag: member="Passenger::PoolOptions::initiateSession" ref="1709d96d9d5d59ce79c90434a45cb076" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structPassenger_1_1PoolOptions.html#1709d96d9d5d59ce79c90434a45cb076">Passenger::PoolOptions::initiateSession</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Whether the session returned by ApplicationPool::Interface::get() should be automatically initiated.
<p>
Defaults to true.
</div>
</div><p>
<a class="anchor" name="ce54185a9981f103a036a7ac3e768612"></a><!-- doxytag: member="Passenger::PoolOptions::log" ref="ce54185a9981f103a036a7ac3e768612" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">AnalyticsLogPtr <a class="el" href="structPassenger_1_1PoolOptions.html#ce54185a9981f103a036a7ac3e768612">Passenger::PoolOptions::log</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An analytics log object to log things to.
<p>
May be the null pointer, in which case analytics logging is disabled.
</div>
</div><p>
<a class="anchor" name="70251ed3cb3713cb26a0b166c6b015c0"></a><!-- doxytag: member="Passenger::PoolOptions::maxRequests" ref="70251ed3cb3713cb26a0b166c6b015c0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned long <a class="el" href="structPassenger_1_1PoolOptions.html#70251ed3cb3713cb26a0b166c6b015c0">Passenger::PoolOptions::maxRequests</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The maximum number of requests that the spawned application may process before exiting.
<p>
A value of 0 means unlimited.
</div>
</div><p>
<a class="anchor" name="d3d545cee2806198797fc6b4197ff87b"></a><!-- doxytag: member="Passenger::PoolOptions::printExceptions" ref="d3d545cee2806198797fc6b4197ff87b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structPassenger_1_1PoolOptions.html#d3d545cee2806198797fc6b4197ff87b">Passenger::PoolOptions::printExceptions</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Whether application processes should print exceptions that occurred during application initialization.
<p>
Defaults to true.
</div>
</div><p>
<a class="anchor" name="b0f889f70a3ed22f2423d110ddaf26f5"></a><!-- doxytag: member="Passenger::PoolOptions::restartDir" ref="b0f889f70a3ed22f2423d110ddaf26f5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#b0f889f70a3ed22f2423d110ddaf26f5">Passenger::PoolOptions::restartDir</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The directory which contains restart.txt and always_restart.txt.
<p>
An empty string means that the default directory should be used.
</div>
</div><p>
<a class="anchor" name="45665fffc8a20ea60a3fcafaff8627ab"></a><!-- doxytag: member="Passenger::PoolOptions::rights" ref="45665fffc8a20ea60a3fcafaff8627ab" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Account::Rights <a class="el" href="structPassenger_1_1PoolOptions.html#45665fffc8a20ea60a3fcafaff8627ab">Passenger::PoolOptions::rights</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Any rights that the spawned application process may have.
<p>
The <a class="el" href="classPassenger_1_1SpawnManager.html" title="An AbstractSpawnManager implementation.">SpawnManager</a> will create a new account for each spawned app, and that account will be assigned these rights.
</div>
</div><p>
<a class="anchor" name="feb629e3ced79f5a2dbccc1beeeeab9e"></a><!-- doxytag: member="Passenger::PoolOptions::spawnMethod" ref="feb629e3ced79f5a2dbccc1beeeeab9e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#feb629e3ced79f5a2dbccc1beeeeab9e">Passenger::PoolOptions::spawnMethod</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Method with which application processes should be spawned.
<p>
Different methods have different performance and compatibility properties. Available methods are "smart-lv2" (default), "smart" and "conservative". The different spawning methods are explained in the "Spawning methods explained" section of the users guide.
</div>
</div><p>
<a class="anchor" name="eaf5a998b4a5da2246685c2dfb8a8c6d"></a><!-- doxytag: member="Passenger::PoolOptions::statThrottleRate" ref="eaf5a998b4a5da2246685c2dfb8a8c6d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned long <a class="el" href="structPassenger_1_1PoolOptions.html#eaf5a998b4a5da2246685c2dfb8a8c6d">Passenger::PoolOptions::statThrottleRate</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A throttling rate for file stats.
<p>
When set to a non-zero value N, restart.txt and other files which are usually stat()ted on every ApplicationPool::get() call will be stat()ed at most every N seconds.
</div>
</div><p>
<a class="anchor" name="b610e568a7b5d3bb27460d6e35952b7e"></a><!-- doxytag: member="Passenger::PoolOptions::useGlobalQueue" ref="b610e568a7b5d3bb27460d6e35952b7e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structPassenger_1_1PoolOptions.html#b610e568a7b5d3bb27460d6e35952b7e">Passenger::PoolOptions::useGlobalQueue</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Whether to use a global queue instead of a per-backend process queue.
<p>
This option is only used by ApplicationPool::get().<p>
If enabled, when all backend processes are active, get() will wait until there's at least one backend process that's idle, instead of queuing the request into a random process's private queue. This is especially useful if a website has one or more long-running requests.
</div>
</div><p>
<a class="anchor" name="7bb617271b0a61645b17b9815ebf300c"></a><!-- doxytag: member="Passenger::PoolOptions::user" ref="7bb617271b0a61645b17b9815ebf300c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string <a class="el" href="structPassenger_1_1PoolOptions.html#7bb617271b0a61645b17b9815ebf300c">Passenger::PoolOptions::user</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
See overview.
<p>
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="PoolOptions_8h-source.html">PoolOptions.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Feb 21 12:22:48 2010 for Passenger by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
|