passenger 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (275) hide show
  1. data/Rakefile +8 -5
  2. data/bin/passenger-install-apache2-module +6 -1
  3. data/doc/ApplicationPool algorithm.txt +23 -5
  4. data/doc/Architectural overview.html +778 -0
  5. data/doc/Security of user switching support.html +1 -1
  6. data/doc/Users guide.html +113 -31
  7. data/doc/Users guide.txt +104 -10
  8. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +683 -0
  9. data/doc/cxxapi/ApplicationPool_8h-source.html +224 -0
  10. data/doc/cxxapi/Application_8h-source.html +448 -0
  11. data/doc/cxxapi/Bucket_8h-source.html +61 -0
  12. data/doc/cxxapi/Configuration_8h-source.html +195 -0
  13. data/doc/cxxapi/DummySpawnManager_8h-source.html +126 -0
  14. data/doc/cxxapi/Exceptions_8h-source.html +244 -0
  15. data/doc/cxxapi/Hooks_8h-source.html +63 -0
  16. data/doc/cxxapi/Logging_8h-source.html +136 -0
  17. data/doc/cxxapi/MessageChannel_8h-source.html +524 -0
  18. data/doc/cxxapi/SpawnManager_8h-source.html +593 -0
  19. data/doc/cxxapi/StandardApplicationPool_8h-source.html +732 -0
  20. data/doc/cxxapi/System_8h-source.html +251 -0
  21. data/doc/cxxapi/Utils_8h-source.html +283 -0
  22. data/doc/cxxapi/annotated.html +59 -0
  23. data/doc/cxxapi/classClient-members.html +35 -0
  24. data/doc/cxxapi/classClient.html +117 -0
  25. data/doc/cxxapi/classDirectoryMapper-members.html +38 -0
  26. data/doc/cxxapi/classDirectoryMapper.html +203 -0
  27. data/doc/cxxapi/classHooks-members.html +33 -0
  28. data/doc/cxxapi/classHooks.html +43 -0
  29. data/doc/cxxapi/classPassenger_1_1Application-members.html +38 -0
  30. data/doc/cxxapi/classPassenger_1_1Application.html +229 -0
  31. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +41 -0
  32. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +359 -0
  33. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +36 -0
  34. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +225 -0
  35. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -0
  36. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -0
  37. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  38. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +43 -0
  39. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +329 -0
  40. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +33 -0
  41. data/doc/cxxapi/classPassenger_1_1BusyException.html +47 -0
  42. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +33 -0
  43. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +44 -0
  44. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +33 -0
  45. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +51 -0
  46. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +33 -0
  47. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +51 -0
  48. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -0
  49. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -0
  50. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
  51. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +38 -0
  52. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +61 -0
  53. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -0
  54. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -0
  55. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
  56. data/doc/cxxapi/classPassenger_1_1IOException-members.html +33 -0
  57. data/doc/cxxapi/classPassenger_1_1IOException.html +54 -0
  58. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -0
  59. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -0
  60. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  61. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +47 -0
  62. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +591 -0
  63. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +35 -0
  64. data/doc/cxxapi/classPassenger_1_1SpawnException.html +77 -0
  65. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +37 -0
  66. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +255 -0
  67. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +43 -0
  68. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +400 -0
  69. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -0
  70. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -0
  71. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  72. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +37 -0
  73. data/doc/cxxapi/classPassenger_1_1SystemException.html +154 -0
  74. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -0
  75. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -0
  76. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  77. data/doc/cxxapi/classPassenger_1_1TempFile-members.html +36 -0
  78. data/doc/cxxapi/classPassenger_1_1TempFile.html +128 -0
  79. data/doc/cxxapi/classPassenger_1_1Thread-members.html +35 -0
  80. data/doc/cxxapi/classPassenger_1_1Thread.html +100 -0
  81. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption-members.html +33 -0
  82. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +46 -0
  83. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption-members.html +33 -0
  84. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption.html +44 -0
  85. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +33 -0
  86. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +44 -0
  87. data/doc/cxxapi/definitions_8h-source.html +28 -0
  88. data/doc/cxxapi/doxygen.css +433 -0
  89. data/doc/cxxapi/doxygen.png +0 -0
  90. data/doc/cxxapi/files.html +42 -0
  91. data/doc/cxxapi/ftv2blank.png +0 -0
  92. data/doc/cxxapi/ftv2doc.png +0 -0
  93. data/doc/cxxapi/ftv2folderclosed.png +0 -0
  94. data/doc/cxxapi/ftv2folderopen.png +0 -0
  95. data/doc/cxxapi/ftv2lastnode.png +0 -0
  96. data/doc/cxxapi/ftv2link.png +0 -0
  97. data/doc/cxxapi/ftv2mlastnode.png +0 -0
  98. data/doc/cxxapi/ftv2mnode.png +0 -0
  99. data/doc/cxxapi/ftv2node.png +0 -0
  100. data/doc/cxxapi/ftv2plastnode.png +0 -0
  101. data/doc/cxxapi/ftv2pnode.png +0 -0
  102. data/doc/cxxapi/ftv2vertline.png +0 -0
  103. data/doc/cxxapi/functions.html +215 -0
  104. data/doc/cxxapi/functions_func.html +210 -0
  105. data/doc/cxxapi/functions_type.html +46 -0
  106. data/doc/cxxapi/functions_vars.html +48 -0
  107. data/doc/cxxapi/graph_legend.dot +22 -0
  108. data/doc/cxxapi/graph_legend.html +87 -0
  109. data/doc/cxxapi/graph_legend.png +0 -0
  110. data/doc/cxxapi/group__Configuration.html +236 -0
  111. data/doc/cxxapi/group__Configuration.png +0 -0
  112. data/doc/cxxapi/group__Core.html +51 -0
  113. data/doc/cxxapi/group__Core.png +0 -0
  114. data/doc/cxxapi/group__Exceptions.html +43 -0
  115. data/doc/cxxapi/group__Hooks.html +46 -0
  116. data/doc/cxxapi/group__Hooks.png +0 -0
  117. data/doc/cxxapi/group__Support.html +406 -0
  118. data/doc/cxxapi/hierarchy.html +67 -0
  119. data/doc/cxxapi/index.html +11 -0
  120. data/doc/cxxapi/inherit__graph__0.map +1 -0
  121. data/doc/cxxapi/inherit__graph__0.md5 +1 -0
  122. data/doc/cxxapi/inherit__graph__0.png +0 -0
  123. data/doc/cxxapi/inherit__graph__1.map +1 -0
  124. data/doc/cxxapi/inherit__graph__1.md5 +1 -0
  125. data/doc/cxxapi/inherit__graph__1.png +0 -0
  126. data/doc/cxxapi/inherit__graph__10.map +1 -0
  127. data/doc/cxxapi/inherit__graph__10.md5 +1 -0
  128. data/doc/cxxapi/inherit__graph__10.png +0 -0
  129. data/doc/cxxapi/inherit__graph__11.map +1 -0
  130. data/doc/cxxapi/inherit__graph__11.md5 +1 -0
  131. data/doc/cxxapi/inherit__graph__11.png +0 -0
  132. data/doc/cxxapi/inherit__graph__12.map +1 -0
  133. data/doc/cxxapi/inherit__graph__12.md5 +1 -0
  134. data/doc/cxxapi/inherit__graph__12.png +0 -0
  135. data/doc/cxxapi/inherit__graph__13.map +1 -0
  136. data/doc/cxxapi/inherit__graph__13.md5 +1 -0
  137. data/doc/cxxapi/inherit__graph__13.png +0 -0
  138. data/doc/cxxapi/inherit__graph__14.map +2 -0
  139. data/doc/cxxapi/inherit__graph__14.md5 +1 -0
  140. data/doc/cxxapi/inherit__graph__14.png +0 -0
  141. data/doc/cxxapi/inherit__graph__15.map +1 -0
  142. data/doc/cxxapi/inherit__graph__15.md5 +1 -0
  143. data/doc/cxxapi/inherit__graph__15.png +0 -0
  144. data/doc/cxxapi/inherit__graph__16.map +1 -0
  145. data/doc/cxxapi/inherit__graph__16.md5 +1 -0
  146. data/doc/cxxapi/inherit__graph__16.png +0 -0
  147. data/doc/cxxapi/inherit__graph__17.map +1 -0
  148. data/doc/cxxapi/inherit__graph__17.md5 +1 -0
  149. data/doc/cxxapi/inherit__graph__17.png +0 -0
  150. data/doc/cxxapi/inherit__graph__18.map +1 -0
  151. data/doc/cxxapi/inherit__graph__18.md5 +1 -0
  152. data/doc/cxxapi/inherit__graph__18.png +0 -0
  153. data/doc/cxxapi/inherit__graph__19.map +2 -0
  154. data/doc/cxxapi/inherit__graph__19.md5 +1 -0
  155. data/doc/cxxapi/inherit__graph__19.png +0 -0
  156. data/doc/cxxapi/inherit__graph__2.map +1 -0
  157. data/doc/cxxapi/inherit__graph__2.md5 +1 -0
  158. data/doc/cxxapi/inherit__graph__2.png +0 -0
  159. data/doc/cxxapi/inherit__graph__20.map +1 -0
  160. data/doc/cxxapi/inherit__graph__20.md5 +1 -0
  161. data/doc/cxxapi/inherit__graph__20.png +0 -0
  162. data/doc/cxxapi/inherit__graph__21.map +1 -0
  163. data/doc/cxxapi/inherit__graph__21.md5 +1 -0
  164. data/doc/cxxapi/inherit__graph__21.png +0 -0
  165. data/doc/cxxapi/inherit__graph__3.map +1 -0
  166. data/doc/cxxapi/inherit__graph__3.md5 +1 -0
  167. data/doc/cxxapi/inherit__graph__3.png +0 -0
  168. data/doc/cxxapi/inherit__graph__4.map +1 -0
  169. data/doc/cxxapi/inherit__graph__4.md5 +1 -0
  170. data/doc/cxxapi/inherit__graph__4.png +0 -0
  171. data/doc/cxxapi/inherit__graph__5.map +1 -0
  172. data/doc/cxxapi/inherit__graph__5.md5 +1 -0
  173. data/doc/cxxapi/inherit__graph__5.png +0 -0
  174. data/doc/cxxapi/inherit__graph__6.map +1 -0
  175. data/doc/cxxapi/inherit__graph__6.md5 +1 -0
  176. data/doc/cxxapi/inherit__graph__6.png +0 -0
  177. data/doc/cxxapi/inherit__graph__7.map +1 -0
  178. data/doc/cxxapi/inherit__graph__7.md5 +1 -0
  179. data/doc/cxxapi/inherit__graph__7.png +0 -0
  180. data/doc/cxxapi/inherit__graph__8.map +1 -0
  181. data/doc/cxxapi/inherit__graph__8.md5 +1 -0
  182. data/doc/cxxapi/inherit__graph__8.png +0 -0
  183. data/doc/cxxapi/inherit__graph__9.map +2 -0
  184. data/doc/cxxapi/inherit__graph__9.md5 +1 -0
  185. data/doc/cxxapi/inherit__graph__9.png +0 -0
  186. data/doc/cxxapi/inherits.html +102 -0
  187. data/doc/cxxapi/main.html +27 -0
  188. data/doc/cxxapi/modules.html +34 -0
  189. data/doc/cxxapi/namespacePassenger.html +208 -0
  190. data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +43 -0
  191. data/doc/cxxapi/namespacemembers.html +70 -0
  192. data/doc/cxxapi/namespacemembers_func.html +66 -0
  193. data/doc/cxxapi/namespacemembers_type.html +46 -0
  194. data/doc/cxxapi/namespaces.html +35 -0
  195. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +33 -0
  196. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +49 -0
  197. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +33 -0
  198. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +49 -0
  199. data/doc/cxxapi/tab_b.gif +0 -0
  200. data/doc/cxxapi/tab_l.gif +0 -0
  201. data/doc/cxxapi/tab_r.gif +0 -0
  202. data/doc/cxxapi/tabs.css +102 -0
  203. data/doc/cxxapi/tree.html +167 -0
  204. data/doc/rdoc/classes/ConditionVariable.html +160 -0
  205. data/doc/rdoc/classes/Exception.html +120 -0
  206. data/doc/rdoc/classes/GC.html +113 -0
  207. data/doc/rdoc/classes/IO.html +150 -0
  208. data/doc/rdoc/classes/Passenger.html +136 -0
  209. data/doc/rdoc/classes/Passenger/AbstractRequestHandler.html +402 -0
  210. data/doc/rdoc/classes/Passenger/AbstractServer.html +649 -0
  211. data/doc/rdoc/classes/Passenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  212. data/doc/rdoc/classes/Passenger/AbstractServer/ServerError.html +96 -0
  213. data/doc/rdoc/classes/Passenger/AbstractServer/ServerNotStarted.html +97 -0
  214. data/doc/rdoc/classes/Passenger/AbstractServer/UnknownMessage.html +96 -0
  215. data/doc/rdoc/classes/Passenger/AppInitError.html +137 -0
  216. data/doc/rdoc/classes/Passenger/Application.html +298 -0
  217. data/doc/rdoc/classes/Passenger/ConsoleTextTemplate.html +172 -0
  218. data/doc/rdoc/classes/Passenger/FrameworkInitError.html +143 -0
  219. data/doc/rdoc/classes/Passenger/HTMLTemplate.html +175 -0
  220. data/doc/rdoc/classes/Passenger/InitializationError.html +141 -0
  221. data/doc/rdoc/classes/Passenger/MessageChannel.html +488 -0
  222. data/doc/rdoc/classes/Passenger/NativeSupport.html +320 -0
  223. data/doc/rdoc/classes/Passenger/SpawnManager.html +375 -0
  224. data/doc/rdoc/classes/Passenger/UnknownError.html +125 -0
  225. data/doc/rdoc/classes/Passenger/Utils.html +578 -0
  226. data/doc/rdoc/classes/Passenger/VersionNotFound.html +140 -0
  227. data/doc/rdoc/classes/PlatformInfo.html +302 -0
  228. data/doc/rdoc/classes/RakeExtensions.html +197 -0
  229. data/doc/rdoc/created.rid +1 -0
  230. data/doc/rdoc/files/DEVELOPERS_TXT.html +230 -0
  231. data/doc/rdoc/files/README.html +150 -0
  232. data/doc/rdoc/files/ext/passenger/native_support_c.html +92 -0
  233. data/doc/rdoc/files/lib/passenger/abstract_request_handler_rb.html +126 -0
  234. data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +127 -0
  235. data/doc/rdoc/files/lib/passenger/application_rb.html +123 -0
  236. data/doc/rdoc/files/lib/passenger/console_text_template_rb.html +122 -0
  237. data/doc/rdoc/files/lib/passenger/constants_rb.html +114 -0
  238. data/doc/rdoc/files/lib/passenger/dependencies_rb.html +130 -0
  239. data/doc/rdoc/files/lib/passenger/exceptions_rb.html +118 -0
  240. data/doc/rdoc/files/lib/passenger/html_template_rb.html +122 -0
  241. data/doc/rdoc/files/lib/passenger/message_channel_rb.html +118 -0
  242. data/doc/rdoc/files/lib/passenger/platform_info_rb.html +122 -0
  243. data/doc/rdoc/files/lib/passenger/simple_benchmarking_rb.html +118 -0
  244. data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +139 -0
  245. data/doc/rdoc/files/lib/passenger/utils_rb.html +130 -0
  246. data/doc/rdoc/files/lib/rake/extensions_rb.html +122 -0
  247. data/doc/rdoc/fr_class_index.html +71 -0
  248. data/doc/rdoc/fr_file_index.html +63 -0
  249. data/doc/rdoc/fr_method_index.html +120 -0
  250. data/doc/rdoc/index.html +26 -0
  251. data/doc/rdoc/rdoc-style.css +187 -0
  252. data/ext/apache2/ApplicationPool.h +12 -0
  253. data/ext/apache2/ApplicationPoolServer.h +6 -0
  254. data/ext/apache2/ApplicationPoolServerExecutable.cpp +6 -0
  255. data/ext/apache2/Bucket.cpp +63 -69
  256. data/ext/apache2/Bucket.h +2 -0
  257. data/ext/apache2/Configuration.cpp +24 -0
  258. data/ext/apache2/Configuration.h +16 -1
  259. data/ext/apache2/Hooks.cpp +5 -3
  260. data/ext/apache2/StandardApplicationPool.h +30 -11
  261. data/lib/passenger/abstract_request_handler.rb +3 -0
  262. data/lib/passenger/abstract_server.rb +3 -3
  263. data/lib/passenger/application.rb +4 -2
  264. data/lib/passenger/dependencies.rb +10 -1
  265. data/lib/passenger/platform_info.rb +40 -1
  266. data/lib/passenger/rack/request_handler.rb +4 -2
  267. data/lib/passenger/railz/application_spawner.rb +7 -1
  268. data/lib/passenger/utils.rb +6 -8
  269. data/lib/rake/gempackagetask.rb +0 -6
  270. data/lib/rake/rdoctask.rb +84 -23
  271. data/test/ApplicationPoolTest.cpp +36 -0
  272. data/test/ruby/rails/minimal_spawner_spec.rb +8 -0
  273. data/test/ruby/utils_spec.rb +33 -0
  274. data/test/stub/rails_apps/foobar/config/environments/production.rb +0 -1
  275. metadata +262 -5
@@ -0,0 +1,26 @@
1
+
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title>Passenger Ruby API</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ </head>
10
+
11
+ <frameset cols="20%,*">
12
+ <frameset rows="15%,55%,30%">
13
+ <frame src="fr_file_index.html" title="Files" name="Files" />
14
+ <frame src="fr_class_index.html" name="Classes" />
15
+ <frame src="fr_method_index.html" name="Methods" />
16
+ </frameset>
17
+ <frame src="files/README.html" name="docwin" />
18
+ <noframes>
19
+ <body bgcolor="white">
20
+ Click <a href="html/index.html">here</a> for a non-frames
21
+ version of this page.
22
+ </body>
23
+ </noframes>
24
+ </frameset>
25
+
26
+ </html>
@@ -0,0 +1,187 @@
1
+ a {
2
+ color: #00F;
3
+ text-decoration: none;
4
+ }
5
+
6
+ a:hover {
7
+ color: #77F;
8
+ text-decoration: underline;
9
+ }
10
+
11
+ body, td, p {
12
+ font-family: "Bitstream Vera Sans", Verdana, Arial, Helvetica, sans-serif;
13
+ background: #FFF;
14
+ color: #000;
15
+ margin: 0px;
16
+ font-size: small;
17
+ }
18
+
19
+ p {
20
+ margin-top: 0.5em;
21
+ margin-bottom: 0.5em;
22
+ }
23
+
24
+ #content {
25
+ margin: 2em;
26
+ margin-left: 3.5em;
27
+ margin-right: 3.5em;
28
+ }
29
+
30
+ #description p {
31
+ margin-bottom: 0.5em;
32
+ }
33
+
34
+ .sectiontitle {
35
+ margin-top: 1em;
36
+ margin-bottom: 1em;
37
+ padding: 0.5em;
38
+ padding-left: 2em;
39
+ background: #005;
40
+ color: #FFF;
41
+ font-weight: bold;
42
+ }
43
+
44
+ .attr-rw {
45
+ padding-left: 1em;
46
+ padding-right: 1em;
47
+ text-align: center;
48
+ color: #055;
49
+ }
50
+
51
+ .attr-name {
52
+ font-weight: bold;
53
+ }
54
+
55
+ .attr-desc {
56
+ }
57
+
58
+ .attr-value {
59
+ font-family: monospace;
60
+ }
61
+
62
+ .file-title-prefix {
63
+ font-size: large;
64
+ }
65
+
66
+ .file-title {
67
+ font-size: large;
68
+ font-weight: bold;
69
+ background: #005;
70
+ color: #FFF;
71
+ }
72
+
73
+ .banner {
74
+ background: #005;
75
+ color: #FFF;
76
+ border: 1px solid black;
77
+ padding: 1em;
78
+ }
79
+
80
+ .banner td {
81
+ background: transparent;
82
+ color: #FFF;
83
+ }
84
+
85
+ h1 a, h2 a, .sectiontitle a, .banner a {
86
+ color: #FF0;
87
+ }
88
+
89
+ h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
90
+ color: #FF7;
91
+ }
92
+
93
+ .dyn-source {
94
+ display: none;
95
+ background: #fffde8;
96
+ color: #000;
97
+ border: #ffe0bb dotted 1px;
98
+ margin: 0.5em 2em 0.5em 2em;
99
+ padding: 0.5em;
100
+ }
101
+
102
+ .dyn-source .cmt {
103
+ color: #00F;
104
+ font-style: italic;
105
+ }
106
+
107
+ .dyn-source .kw {
108
+ color: #070;
109
+ font-weight: bold;
110
+ }
111
+
112
+ .method {
113
+ margin-left: 1em;
114
+ margin-right: 1em;
115
+ margin-bottom: 1em;
116
+ }
117
+
118
+ .description pre {
119
+ padding: 0.5em;
120
+ border: #ffe0bb dotted 1px;
121
+ background: #fffde8;
122
+ }
123
+
124
+ .method .title {
125
+ font-family: monospace;
126
+ font-size: large;
127
+ border-bottom: 1px dashed black;
128
+ margin-bottom: 0.3em;
129
+ padding-bottom: 0.1em;
130
+ }
131
+
132
+ .method .description, .method .sourcecode {
133
+ margin-left: 1em;
134
+ }
135
+
136
+ .description p, .sourcecode p {
137
+ margin-bottom: 0.5em;
138
+ }
139
+
140
+ .method .sourcecode p.source-link {
141
+ text-indent: 0em;
142
+ margin-top: 0.5em;
143
+ }
144
+
145
+ .method .aka {
146
+ margin-top: 0.3em;
147
+ margin-left: 1em;
148
+ font-style: italic;
149
+ text-indent: 2em;
150
+ }
151
+
152
+ h1 {
153
+ padding: 1em;
154
+ margin-left: -1.5em;
155
+ font-size: x-large;
156
+ font-weight: bold;
157
+ color: #FFF;
158
+ background: #007;
159
+ }
160
+
161
+ h2 {
162
+ padding: 0.5em 1em 0.5em 1em;
163
+ margin-left: -1.5em;
164
+ font-size: large;
165
+ font-weight: bold;
166
+ color: #FFF;
167
+ background: #009;
168
+ }
169
+
170
+ h3, h4, h5, h6 {
171
+ color: #220088;
172
+ border-bottom: #5522bb solid 1px;
173
+ }
174
+
175
+ .sourcecode > pre {
176
+ padding: 0.5em;
177
+ border: 1px dotted black;
178
+ background: #FFE;
179
+ }
180
+
181
+ dt {
182
+ font-weight: bold
183
+ }
184
+
185
+ dd {
186
+ margin-bottom: 0.7em;
187
+ }
@@ -173,6 +173,18 @@ public:
173
173
  */
174
174
  virtual void setMaxPerApp(unsigned int max) = 0;
175
175
 
176
+ /**
177
+ * Sets whether to use a global queue instead of a per-backend process
178
+ * queue. If enabled, when all backend processes are active, get() will
179
+ * wait until there's at least one backend process that's idle, instead
180
+ * of queuing the request into a random process's private queue.
181
+ * This is especially useful if a website has one or more long-running
182
+ * requests.
183
+ *
184
+ * Defaults to false.
185
+ */
186
+ virtual void setUseGlobalQueue(bool value) = 0;
187
+
176
188
  /**
177
189
  * Get the process ID of the spawn server that is used.
178
190
  *
@@ -289,6 +289,12 @@ private:
289
289
  channel.write("setMaxPerApp", toString(max).c_str(), NULL);
290
290
  }
291
291
 
292
+ virtual void setUseGlobalQueue(bool value) {
293
+ MessageChannel channel(data->server);
294
+ boost::mutex::scoped_lock l(data->lock);
295
+ channel.write("setUseGlobalQueue", value ? "true" : "false", NULL);
296
+ }
297
+
292
298
  virtual pid_t getSpawnServerPid() const {
293
299
  this_thread::disable_syscall_interruption dsi;
294
300
  MessageChannel channel(data->server);
@@ -282,6 +282,10 @@ private:
282
282
  server.pool.setMaxPerApp(maxPerApp);
283
283
  }
284
284
 
285
+ void processSetUseGlobalQueue(bool value) {
286
+ server.pool.setUseGlobalQueue(value);
287
+ }
288
+
285
289
  void processGetSpawnServerPid(const vector<string> &args) {
286
290
  channel.write(toString(server.pool.getSpawnServerPid()).c_str(), NULL);
287
291
  }
@@ -334,6 +338,8 @@ private:
334
338
  processGetCount(args);
335
339
  } else if (args[0] == "setMaxPerApp" && args.size() == 2) {
336
340
  processSetMaxPerApp(atoi(args[1]));
341
+ } else if (args[0] == "setUseGlobalQueue" && args.size() == 2) {
342
+ processSetUseGlobalQueue(args[1] == "true");
337
343
  } else if (args[0] == "getSpawnServerPid" && args.size() == 1) {
338
344
  processGetSpawnServerPid(args);
339
345
  } else {
@@ -19,86 +19,80 @@
19
19
  */
20
20
  #include "Bucket.h"
21
21
 
22
- static apr_status_t bucket_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block);
22
+ static apr_status_t bucket_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block);
23
23
 
24
- static const apr_bucket_type_t apr_bucket_type_passenger_pipe = {
24
+ static const apr_bucket_type_t apr_bucket_type_passenger_pipe = {
25
25
  "PASSENGER_PIPE",
26
26
  5,
27
- apr_bucket_type_t::APR_BUCKET_DATA,
28
- apr_bucket_destroy_noop,
29
- bucket_read,
30
- apr_bucket_setaside_notimpl,
31
- apr_bucket_split_notimpl,
32
- apr_bucket_copy_notimpl
33
- };
27
+ apr_bucket_type_t::APR_BUCKET_DATA,
28
+ apr_bucket_destroy_noop,
29
+ bucket_read,
30
+ apr_bucket_setaside_notimpl,
31
+ apr_bucket_split_notimpl,
32
+ apr_bucket_copy_notimpl
33
+ };
34
34
 
35
35
  static apr_status_t
36
- bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type_e block) {
37
- apr_file_t *pipe;
38
- char *buf;
39
- apr_status_t ret;
40
- apr_interval_time_t timeout;
36
+ bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type_e block) {
37
+ apr_file_t *pipe;
38
+ char *buf;
39
+ apr_status_t ret;
41
40
 
42
- pipe = (apr_file_t *) bucket->data;
43
- if (block == APR_NONBLOCK_READ) {
44
- apr_file_pipe_timeout_get(pipe, &timeout);
45
- apr_file_pipe_timeout_set(pipe, 0);
46
- }
47
-
48
- *str = NULL;
49
- *len = APR_BUCKET_BUFF_SIZE;
50
- buf = (char *) apr_bucket_alloc(*len, bucket->list); // TODO: check for failure?
51
-
52
- ret = apr_file_read(pipe, buf, len);
53
- if (block == APR_NONBLOCK_READ) {
54
- apr_file_pipe_timeout_set(pipe, timeout);
55
- }
56
-
57
- if (ret != APR_SUCCESS && ret != APR_EOF) {
41
+ pipe = (apr_file_t *) bucket->data;
42
+
43
+ *str = NULL;
44
+ *len = APR_BUCKET_BUFF_SIZE;
45
+ buf = (char *) apr_bucket_alloc(*len, bucket->list); // TODO: check for failure?
46
+
47
+ do {
48
+ ret = apr_file_read(pipe, buf, len);
49
+ } while (APR_STATUS_IS_EAGAIN(ret));
50
+
51
+ if (ret != APR_SUCCESS && ret != APR_EOF) {
58
52
  // ... we might want to set an error flag here ...
59
- apr_bucket_free(buf);
60
- return ret;
61
- }
62
- /*
63
- * If there's more to read we have to keep the rest of the pipe
64
- * for later.
65
- */
66
- if (*len > 0) {
67
- apr_bucket_heap *h;
68
- /* Change the current bucket to refer to what we read */
69
- bucket = apr_bucket_heap_make(bucket, buf, *len, apr_bucket_free);
70
- h = (apr_bucket_heap *) bucket->data;
71
- h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
72
- *str = buf;
73
- APR_BUCKET_INSERT_AFTER(bucket, passenger_bucket_create(pipe, bucket->list));
74
- } else {
75
- apr_bucket_free(buf);
76
- bucket = apr_bucket_immortal_make(bucket, "", 0);
77
- *str = (const char *) bucket->data;
53
+ apr_bucket_free(buf);
54
+ return ret;
55
+ }
56
+ /*
57
+ * If there's more to read we have to keep the rest of the pipe
58
+ * for later.
59
+ */
60
+ if (*len > 0) {
61
+ apr_bucket_heap *h;
62
+ /* Change the current bucket to refer to what we read */
63
+ bucket = apr_bucket_heap_make(bucket, buf, *len, apr_bucket_free);
64
+ h = (apr_bucket_heap *) bucket->data;
65
+ h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
66
+ *str = buf;
67
+ APR_BUCKET_INSERT_AFTER(bucket, passenger_bucket_create(pipe, bucket->list));
68
+ } else {
69
+ apr_bucket_free(buf);
70
+ bucket = apr_bucket_immortal_make(bucket, "", 0);
71
+ *str = (const char *) bucket->data;
78
72
  // if (rv != APR_EOF) {
79
73
  // ... we might want to set an error flag here ...
80
- // }
81
- }
82
- return APR_SUCCESS;
83
- }
84
-
74
+ // }
75
+ }
76
+ return APR_SUCCESS;
77
+ }
78
+
85
79
  apr_bucket *
86
- passenger_bucket_make(apr_bucket *bucket, apr_file_t *pipe) {
87
- bucket->type = &apr_bucket_type_passenger_pipe;
88
- bucket->length = (apr_size_t)(-1);
89
- bucket->start = -1;
90
- bucket->data = pipe;
91
- return bucket;
92
- }
93
-
80
+ passenger_bucket_make(apr_bucket *bucket, apr_file_t *pipe) {
81
+ bucket->type = &apr_bucket_type_passenger_pipe;
82
+ bucket->length = (apr_size_t)(-1);
83
+ bucket->start = -1;
84
+ bucket->data = pipe;
85
+ return bucket;
86
+ }
87
+
94
88
  apr_bucket *
95
- passenger_bucket_create(apr_file_t *pipe, apr_bucket_alloc_t *list) {
89
+ passenger_bucket_create(apr_file_t *pipe, apr_bucket_alloc_t *list) {
96
90
  apr_bucket *bucket;
97
91
 
98
- bucket = (apr_bucket *) apr_bucket_alloc(sizeof(*bucket), list);
99
- APR_BUCKET_INIT(bucket);
100
- bucket->free = apr_bucket_free;
101
- bucket->list = list;
102
- return passenger_bucket_make(bucket, pipe);
103
- }
92
+ bucket = (apr_bucket *) apr_bucket_alloc(sizeof(*bucket), list);
93
+ APR_BUCKET_INIT(bucket);
94
+ bucket->free = apr_bucket_free;
95
+ bucket->list = list;
96
+ return passenger_bucket_make(bucket, pipe);
97
+ }
104
98
 
@@ -26,6 +26,8 @@
26
26
  * file descriptor management code.
27
27
  *
28
28
  * passenger_bucket is like apr_bucket_pipe, but never closes the pipe's file descriptor.
29
+ * It also ignores the APR_NONBLOCK_READ because that's known to cause strange
30
+ * I/O problems.
29
31
  */
30
32
 
31
33
  #include "apr_buckets.h"
@@ -105,6 +105,8 @@ passenger_config_create_server(apr_pool_t *p, server_rec *s) {
105
105
  config->maxInstancesPerAppSpecified = false;
106
106
  config->poolIdleTime = DEFAULT_POOL_IDLE_TIME;
107
107
  config->poolIdleTimeSpecified = false;
108
+ config->useGlobalQueue = false;
109
+ config->useGlobalQueueSpecified = false;
108
110
  config->userSwitching = true;
109
111
  config->userSwitchingSpecified = false;
110
112
  config->defaultUser = NULL;
@@ -126,6 +128,8 @@ passenger_config_merge_server(apr_pool_t *p, void *basev, void *addv) {
126
128
  config->maxInstancesPerAppSpecified = base->maxInstancesPerAppSpecified || add->maxInstancesPerAppSpecified;
127
129
  config->poolIdleTime = (add->poolIdleTime) ? base->poolIdleTime : add->poolIdleTime;
128
130
  config->poolIdleTimeSpecified = base->poolIdleTimeSpecified || add->poolIdleTimeSpecified;
131
+ config->useGlobalQueue = (add->useGlobalQueue) ? base->useGlobalQueue : add->useGlobalQueue;
132
+ config->useGlobalQueueSpecified = base->useGlobalQueueSpecified || add->useGlobalQueueSpecified;
129
133
  config->userSwitching = (add->userSwitchingSpecified) ? add->userSwitching : base->userSwitching;
130
134
  config->userSwitchingSpecified = base->userSwitchingSpecified || add->userSwitchingSpecified;
131
135
  config->defaultUser = (add->defaultUser == NULL) ? base->defaultUser : add->defaultUser;
@@ -148,6 +152,8 @@ passenger_config_merge_all_servers(apr_pool_t *pool, server_rec *main_server) {
148
152
  final->maxInstancesPerAppSpecified = final->maxInstancesPerAppSpecified || config->maxInstancesPerAppSpecified;
149
153
  final->poolIdleTime = (final->poolIdleTimeSpecified) ? final->poolIdleTime : config->poolIdleTime;
150
154
  final->poolIdleTimeSpecified = final->poolIdleTimeSpecified || config->poolIdleTimeSpecified;
155
+ final->useGlobalQueue = (final->useGlobalQueue) ? final->useGlobalQueue : config->useGlobalQueue;
156
+ final->useGlobalQueueSpecified = final->useGlobalQueueSpecified || config->useGlobalQueueSpecified;
151
157
  final->userSwitching = (config->userSwitchingSpecified) ? config->userSwitching : final->userSwitching;
152
158
  final->userSwitchingSpecified = final->userSwitchingSpecified || config->userSwitchingSpecified;
153
159
  final->defaultUser = (final->defaultUser != NULL) ? final->defaultUser : config->defaultUser;
@@ -252,6 +258,19 @@ cmd_passenger_pool_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
252
258
  }
253
259
  }
254
260
 
261
+ static const char *
262
+ cmd_passenger_use_global_queue(cmd_parms *cmd, void *pcfg, int arg) {
263
+ ServerConfig *config = (ServerConfig *) ap_get_module_config(
264
+ cmd->server->module_config, &passenger_module);
265
+ if (arg) {
266
+ config->useGlobalQueue = true;
267
+ } else {
268
+ config->useGlobalQueue = false;
269
+ }
270
+ config->useGlobalQueueSpecified = true;
271
+ return NULL;
272
+ }
273
+
255
274
  static const char *
256
275
  cmd_passenger_user_switching(cmd_parms *cmd, void *pcfg, int arg) {
257
276
  ServerConfig *config = (ServerConfig *) ap_get_module_config(
@@ -402,6 +421,11 @@ const command_rec passenger_commands[] = {
402
421
  NULL,
403
422
  RSRC_CONF,
404
423
  "The maximum number of seconds that an application may be idle before it gets terminated."),
424
+ AP_INIT_FLAG("PassengerUseGlobalQueue",
425
+ (Take1Func) cmd_passenger_use_global_queue,
426
+ NULL,
427
+ ACCESS_CONF | RSRC_CONF,
428
+ "Enable or disable Passenger's global queuing mode mode."),
405
429
  AP_INIT_FLAG("PassengerUserSwitching",
406
430
  (Take1Func) cmd_passenger_user_switching,
407
431
  NULL,