passenger 2.1.3 → 2.2.0
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.
- data/DEVELOPERS.TXT +2 -0
- data/INSTALL +3 -1
- data/LICENSE +19 -355
- data/NEWS +3 -0
- data/README +11 -4
- data/Rakefile +435 -236
- data/bin/passenger-config +20 -14
- data/bin/passenger-install-apache2-module +67 -201
- data/bin/passenger-install-nginx-module +477 -0
- data/bin/passenger-make-enterprisey +17 -12
- data/bin/passenger-memory-stats +33 -23
- data/bin/passenger-spawn-server +17 -12
- data/bin/passenger-status +18 -13
- data/bin/passenger-stress-test +17 -12
- data/doc/{Users guide.html → Users guide Apache.html } +79 -61
- data/doc/{Users guide.txt → Users guide Apache.txt } +43 -939
- data/doc/Users guide Nginx.html +2276 -0
- data/doc/Users guide Nginx.txt +776 -0
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +9 -4
- data/doc/cxxapi/ApplicationPool_8h-source.html +9 -4
- data/doc/cxxapi/Application_8h-source.html +26 -21
- data/doc/cxxapi/Bucket_8h-source.html +54 -44
- data/doc/cxxapi/CachedFileStat_8h-source.html +9 -4
- data/doc/cxxapi/Configuration_8h-source.html +357 -339
- data/doc/cxxapi/DirectoryMapper_8h-source.html +294 -280
- data/doc/cxxapi/DummySpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/Exceptions_8h-source.html +9 -4
- data/doc/cxxapi/FileChecker_8h-source.html +9 -4
- data/doc/cxxapi/Hooks_8h-source.html +50 -40
- data/doc/cxxapi/Logging_8h-source.html +9 -4
- data/doc/cxxapi/MessageChannel_8h-source.html +20 -15
- data/doc/cxxapi/PoolOptions_8h-source.html +10 -5
- data/doc/cxxapi/SpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +10 -5
- data/doc/cxxapi/SystemTime_8h-source.html +9 -4
- data/doc/cxxapi/Utils_8h-source.html +242 -214
- data/doc/cxxapi/annotated.html +4 -28
- data/doc/cxxapi/classClient-members.html +4 -4
- data/doc/cxxapi/classClient.html +14 -11
- data/doc/cxxapi/classHooks-members.html +4 -5
- data/doc/cxxapi/classHooks.html +26 -24
- data/doc/cxxapi/classPassenger_1_1Application-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1Application.html +40 -37
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +95 -92
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +26 -23
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +17 -17
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +139 -136
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +13 -10
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BusyException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +4 -5
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +45 -43
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +13 -10
- data/doc/cxxapi/classPassenger_1_1FileChecker-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileChecker.html +22 -19
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1IOException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +228 -225
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +50 -47
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +73 -70
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemException.html +17 -14
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemTime.html +14 -11
- data/doc/cxxapi/classes.html +35 -0
- data/doc/cxxapi/definitions_8h-source.html +9 -4
- data/doc/cxxapi/doxygen.css +311 -303
- data/doc/cxxapi/files.html +9 -18
- data/doc/cxxapi/functions.html +5 -224
- data/doc/cxxapi/functions_func.html +5 -185
- data/doc/cxxapi/functions_type.html +4 -4
- data/doc/cxxapi/functions_vars.html +4 -4
- data/doc/cxxapi/graph_legend.dot +19 -19
- data/doc/cxxapi/graph_legend.html +5 -5
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +11 -13
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +10 -12
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +5 -7
- data/doc/cxxapi/group__Hooks.html +5 -7
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +5 -624
- data/doc/cxxapi/hierarchy.html +6 -6
- data/doc/cxxapi/inherit__graph__0.map +1 -1
- data/doc/cxxapi/inherit__graph__0.md5 +1 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +1 -1
- data/doc/cxxapi/inherit__graph__1.md5 +1 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +1 -1
- data/doc/cxxapi/inherit__graph__10.md5 +1 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +1 -1
- data/doc/cxxapi/inherit__graph__11.md5 +1 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +1 -1
- data/doc/cxxapi/inherit__graph__12.md5 +1 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +1 -2
- data/doc/cxxapi/inherit__graph__13.md5 +1 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +2 -1
- data/doc/cxxapi/inherit__graph__14.md5 +1 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +1 -1
- data/doc/cxxapi/inherit__graph__15.md5 +1 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +1 -1
- data/doc/cxxapi/inherit__graph__16.md5 +1 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +1 -1
- data/doc/cxxapi/inherit__graph__17.md5 +1 -1
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.map +1 -1
- data/doc/cxxapi/inherit__graph__18.md5 +1 -1
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.map +1 -1
- data/doc/cxxapi/inherit__graph__19.md5 +1 -1
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +1 -1
- data/doc/cxxapi/inherit__graph__2.md5 +1 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +2 -2
- data/doc/cxxapi/inherit__graph__20.md5 +1 -1
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +1 -1
- data/doc/cxxapi/inherit__graph__21.md5 +1 -1
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +1 -1
- data/doc/cxxapi/inherit__graph__3.md5 +1 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +1 -1
- data/doc/cxxapi/inherit__graph__4.md5 +1 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +1 -2
- data/doc/cxxapi/inherit__graph__5.md5 +1 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +2 -1
- data/doc/cxxapi/inherit__graph__6.md5 +1 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +1 -1
- data/doc/cxxapi/inherit__graph__7.md5 +1 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +1 -1
- data/doc/cxxapi/inherit__graph__8.md5 +1 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +1 -1
- data/doc/cxxapi/inherit__graph__9.md5 +1 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +41 -41
- data/doc/cxxapi/main.html +4 -4
- data/doc/cxxapi/modules.html +4 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +13 -10
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +5 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +16 -13
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +63 -60
- data/doc/cxxapi/tabs.css +5 -2
- data/doc/cxxapi/tree.html +7 -81
- data/doc/rdoc/classes/ConditionVariable.html +59 -59
- data/doc/rdoc/classes/Exception.html +11 -11
- data/doc/rdoc/classes/GC.html +4 -4
- data/doc/rdoc/classes/IO.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger.html +75 -20
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +125 -130
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +236 -236
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +213 -213
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +28 -28
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +91 -75
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Application.html +64 -64
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +34 -34
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +13 -13
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +30 -30
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +42 -42
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +55 -53
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +1 -1
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +25 -30
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +116 -117
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +22 -22
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +118 -124
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +354 -354
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +9 -9
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +37 -37
- data/doc/rdoc/classes/PlatformInfo.html +282 -261
- data/doc/rdoc/classes/RakeExtensions.html +7 -7
- data/doc/rdoc/classes/Signal.html +26 -26
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +6 -1
- data/doc/rdoc/files/README.html +15 -6
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +20 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +22 -12
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +27 -21
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +21 -12
- data/doc/rdoc/files/misc/rake/extensions_rb.html +21 -12
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +116 -112
- data/doc/users_guide_snippets/analysis_and_system_maintenance_tools.txt +144 -0
- data/doc/users_guide_snippets/appendix_a_about.txt +13 -0
- data/doc/users_guide_snippets/appendix_b_terminology.txt +63 -0
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +304 -0
- data/doc/users_guide_snippets/global_queueing_explained.txt +78 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +75 -0
- data/doc/users_guide_snippets/rails_spawn_method.txt +48 -0
- data/doc/users_guide_snippets/tips.txt +173 -0
- data/ext/apache2/Bucket.cpp +17 -12
- data/ext/apache2/Bucket.h +17 -12
- data/ext/apache2/Configuration.cpp +17 -12
- data/ext/apache2/Configuration.h +27 -14
- data/ext/apache2/DirectoryMapper.h +21 -12
- data/ext/apache2/Hooks.cpp +67 -21
- data/ext/apache2/Hooks.h +17 -12
- data/ext/apache2/mod_passenger.c +17 -12
- data/ext/{apache2 → common}/Application.h +19 -14
- data/ext/{apache2 → common}/ApplicationPool.h +17 -12
- data/ext/{apache2 → common}/ApplicationPoolServer.h +18 -72
- data/ext/{apache2 → common}/ApplicationPoolServerExecutable.cpp +45 -104
- data/ext/common/ApplicationPoolStatusReporter.h +212 -0
- data/ext/{apache2 → common}/CachedFileStat.cpp +17 -12
- data/ext/{apache2 → common}/CachedFileStat.h +17 -12
- data/ext/{apache2 → common}/DummySpawnManager.h +17 -12
- data/ext/{apache2 → common}/Exceptions.h +17 -12
- data/ext/{apache2 → common}/FileChecker.h +17 -12
- data/ext/common/Logging.cpp +65 -0
- data/ext/{apache2 → common}/Logging.h +17 -12
- data/ext/{apache2 → common}/MessageChannel.h +17 -12
- data/ext/{apache2 → common}/PoolOptions.h +17 -12
- data/ext/{apache2 → common}/SpawnManager.h +17 -12
- data/ext/{apache2 → common}/StandardApplicationPool.h +17 -12
- data/ext/common/StaticString.h +147 -0
- data/ext/common/SystemTime.cpp +33 -0
- data/ext/{apache2 → common}/SystemTime.h +17 -12
- data/ext/{apache2 → common}/Utils.cpp +69 -12
- data/ext/{apache2 → common}/Utils.h +41 -12
- data/ext/nginx/Configuration.c +1091 -0
- data/ext/nginx/Configuration.h +71 -0
- data/ext/nginx/ContentHandler.c +1154 -0
- data/ext/nginx/ContentHandler.h +64 -0
- data/ext/nginx/HelperServer.cpp +857 -0
- data/ext/nginx/HttpStatusExtractor.h +161 -0
- data/ext/nginx/ScgiRequestParser.h +317 -0
- data/ext/nginx/StaticContentHandler.c +222 -0
- data/ext/nginx/StaticContentHandler.h +37 -0
- data/ext/nginx/config +41 -0
- data/ext/nginx/ngx_http_passenger_module.c +572 -0
- data/ext/nginx/ngx_http_passenger_module.h +72 -0
- data/ext/oxt/backtrace.cpp +8 -1
- data/ext/oxt/system_calls.cpp +40 -0
- data/ext/oxt/system_calls.hpp +14 -7
- data/ext/phusion_passenger/extconf.rb +17 -12
- data/ext/phusion_passenger/native_support.c +19 -12
- data/lib/phusion_passenger/abstract_installer.rb +196 -0
- data/lib/phusion_passenger/abstract_request_handler.rb +19 -24
- data/lib/phusion_passenger/abstract_server.rb +17 -12
- data/lib/phusion_passenger/abstract_server_collection.rb +17 -12
- data/lib/phusion_passenger/admin_tools.rb +23 -0
- data/lib/phusion_passenger/admin_tools/control_process.rb +39 -13
- data/lib/phusion_passenger/application.rb +17 -12
- data/lib/phusion_passenger/console_text_template.rb +17 -12
- data/lib/phusion_passenger/constants.rb +22 -11
- data/lib/phusion_passenger/dependencies.rb +47 -12
- data/lib/phusion_passenger/events.rb +17 -12
- data/lib/phusion_passenger/exceptions.rb +17 -12
- data/lib/phusion_passenger/html_template.rb +17 -12
- data/lib/phusion_passenger/message_channel.rb +17 -12
- data/lib/phusion_passenger/packaging.rb +39 -0
- data/lib/phusion_passenger/platform_info.rb +48 -22
- data/lib/phusion_passenger/rack/application_spawner.rb +22 -11
- data/lib/phusion_passenger/rack/request_handler.rb +21 -12
- data/lib/phusion_passenger/railz/application_spawner.rb +23 -23
- data/lib/phusion_passenger/railz/framework_spawner.rb +18 -14
- data/lib/phusion_passenger/railz/request_handler.rb +18 -11
- data/lib/phusion_passenger/simple_benchmarking.rb +17 -12
- data/lib/phusion_passenger/spawn_manager.rb +17 -20
- data/lib/phusion_passenger/templates/{apache_must_be_compiled_with_compatible_mpm.txt.erb → apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{apache2_config_snippets.txt.erb → apache2/config_snippets.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{deployment_example.txt.erb → apache2/deployment_example.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{no_write_permission_to_passenger_root.txt.erb → apache2/no_write_permission_to_passenger_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{possible_solutions_for_compilation_and_installation_problems.txt.erb → apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{run_installer_as_root.txt.erb → apache2/run_installer_as_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{welcome.txt.erb → apache2/welcome.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +17 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb +5 -0
- data/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb +22 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb +21 -0
- data/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/welcome.txt.erb +15 -0
- data/lib/phusion_passenger/utils.rb +20 -15
- data/lib/phusion_passenger/wsgi/application_spawner.rb +18 -11
- data/lib/phusion_passenger/wsgi/request_handler.py +23 -0
- data/misc/copy_boost_headers.rb +23 -0
- data/misc/find_owner_pipe_leaks.rb +18 -11
- data/misc/rake/cplusplus.rb +18 -11
- data/misc/rake/extensions.rb +21 -14
- data/misc/render_error_pages.rb +18 -11
- data/test/ApplicationPoolServerTest.cpp +1 -3
- data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +1 -1
- data/test/CxxTestMain.cpp +19 -3
- data/test/HttpStatusExtractorTest.cpp +181 -0
- data/test/ScgiRequestParserTest.cpp +337 -0
- data/test/StaticStringTest.cpp +51 -0
- data/test/UtilsTest.cpp +32 -0
- data/test/config.yml.example +5 -0
- data/test/{integration_tests.rb → integration_tests/apache2_tests.rb} +7 -299
- data/test/integration_tests/hello_world_rack_spec.rb +36 -0
- data/test/integration_tests/hello_world_wsgi_spec.rb +41 -0
- data/test/integration_tests/mycook_spec.rb +192 -0
- data/test/integration_tests/nginx_tests.rb +98 -0
- data/test/ruby/rack/application_spawner_spec.rb +40 -0
- data/test/stub/nginx/koi-utf +109 -0
- data/test/stub/nginx/koi-win +103 -0
- data/test/stub/nginx/mime.types +70 -0
- data/test/stub/nginx/nginx.conf.erb +57 -0
- data/test/stub/nginx/win-utf +126 -0
- data/test/stub/rails_apps/mycook/app/controllers/uploads_controller.rb +4 -0
- data/test/stub/rails_apps/mycook/config/routes.rb +1 -1
- data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
- data/test/support/Support.h +40 -0
- data/test/support/nginx_controller.rb +98 -0
- data/test/support/test_helper.rb +79 -0
- metadata +1091 -1028
- data/benchmark/DummyRequestHandler.cpp +0 -101
- data/ext/apache2/Logging.cpp +0 -60
- data/ext/apache2/SystemTime.cpp +0 -28
@@ -1,21 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Phusion Passenger - http://www.modrails.com/
|
3
|
-
# Copyright (
|
3
|
+
# Copyright (c) 2008, 2009 Phusion
|
4
4
|
#
|
5
|
-
# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
|
5
|
+
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# the
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
10
13
|
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
# THE SOFTWARE.
|
19
24
|
|
20
25
|
PASSENGER_ROOT = File.expand_path(File.dirname(__FILE__) << "/..")
|
21
26
|
require 'digest/md5'
|
data/bin/passenger-memory-stats
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Phusion Passenger - http://www.modrails.com/
|
3
|
-
# Copyright (
|
3
|
+
# Copyright (c) 2008, 2009 Phusion
|
4
4
|
#
|
5
|
-
# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
|
5
|
+
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# the
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
10
13
|
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
# THE SOFTWARE.
|
19
24
|
|
20
25
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib")
|
21
26
|
require 'phusion_passenger/platform_info'
|
@@ -124,25 +129,30 @@ class MemoryStats
|
|
124
129
|
end
|
125
130
|
|
126
131
|
def start
|
127
|
-
if PlatformInfo.httpd
|
128
|
-
|
132
|
+
if PlatformInfo.httpd
|
133
|
+
apache_processes = list_processes(:exe => PlatformInfo.httpd)
|
134
|
+
if apache_processes.empty?
|
135
|
+
# On some Linux distros, the Apache worker processes
|
136
|
+
# are called "httpd.worker"
|
137
|
+
apache_processes = list_processes(:exe => "#{PlatformInfo.httpd}.worker")
|
138
|
+
end
|
139
|
+
print_process_list("Apache processes", apache_processes)
|
140
|
+
else
|
141
|
+
apache_processes = []
|
142
|
+
puts "#{BLUE_BG}#{BOLD}#{YELLOW}------------- Apache processes -------------#{RESET}\n"
|
143
|
+
STDERR.puts "*** WARNING: The Apache executable cannot be found."
|
129
144
|
STDERR.puts "Please set the APXS2 environment variable to your 'apxs2' " <<
|
130
145
|
"executable's filename, or set the HTTPD environment variable " <<
|
131
146
|
"to your 'httpd' or 'apache2' executable's filename."
|
132
|
-
exit 1
|
133
147
|
end
|
134
148
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
# are called "httpd.worker"
|
139
|
-
apache_processes = list_processes(:exe => "#{PlatformInfo.httpd}.worker")
|
140
|
-
end
|
141
|
-
print_process_list("Apache processes", apache_processes)
|
149
|
+
puts
|
150
|
+
nginx_processes = list_processes(:exe => "nginx")
|
151
|
+
print_process_list("Nginx processes", nginx_processes)
|
142
152
|
|
143
153
|
puts
|
144
154
|
passenger_processes = list_processes(:match =>
|
145
|
-
/((^| )Passenger |(^| )Rails:|(^| )Rack:|ApplicationPoolServerExecutable)/)
|
155
|
+
/((^| )Passenger |(^| )Rails:|(^| )Rack:|ApplicationPoolServerExecutable|PassengerNginxHelperServer)/)
|
146
156
|
print_process_list("Passenger processes", passenger_processes, :show_ppid => false)
|
147
157
|
|
148
158
|
if RUBY_PLATFORM !~ /linux/
|
data/bin/passenger-spawn-server
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Phusion Passenger - http://www.modrails.com/
|
3
|
-
# Copyright (
|
3
|
+
# Copyright (c) 2008, 2009 Phusion
|
4
4
|
#
|
5
|
-
# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
|
5
|
+
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# the
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
10
13
|
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
# THE SOFTWARE.
|
19
24
|
|
20
25
|
root = File.expand_path("#{File.dirname(__FILE__)}/..")
|
21
26
|
$LOAD_PATH.unshift("#{root}/lib", "#{root}/ext")
|
data/bin/passenger-status
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Phusion Passenger - http://www.modrails.com/
|
3
|
-
# Copyright (
|
3
|
+
# Copyright (c) 2008, 2009 Phusion
|
4
4
|
#
|
5
|
-
# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
|
5
|
+
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# the
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
10
13
|
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
# THE SOFTWARE.
|
19
24
|
|
20
25
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
21
26
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../ext")
|
@@ -64,7 +69,7 @@ def start
|
|
64
69
|
exit 1
|
65
70
|
end
|
66
71
|
else
|
67
|
-
show_status(ControlProcess.
|
72
|
+
show_status(ControlProcess.for_pid(ARGV[0].to_i))
|
68
73
|
end
|
69
74
|
end
|
70
75
|
|
data/bin/passenger-stress-test
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Phusion Passenger - http://www.modrails.com/
|
3
|
-
# Copyright (
|
3
|
+
# Copyright (c) 2008, 2009 Phusion
|
4
4
|
#
|
5
|
-
# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
|
5
|
+
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# the
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
10
13
|
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
# GNU General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
# THE SOFTWARE.
|
19
24
|
|
20
25
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
21
26
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../ext")
|
@@ -622,11 +622,14 @@ be located in the <tt>sbin</tt> folder instead of the <tt>bin</tt> folder.</td>
|
|
622
622
|
native Linux package, because no compilation is necessary.</td>
|
623
623
|
</tr></table>
|
624
624
|
</div>
|
625
|
-
<div class="paragraph"><p>If your system has multiple Ruby installations
|
626
|
-
MacOS X
|
627
|
-
|
628
|
-
|
629
|
-
|
625
|
+
<div class="paragraph"><p>If your system has multiple Ruby installations — which is likely the case on
|
626
|
+
MacOS X, or if you’ve also installed
|
627
|
+
<a href="http://www.rubyenterpriseedition.com">Ruby Enterprise Edition</a> — then you
|
628
|
+
will need to tell the operating system which Ruby installation to use, prior to
|
629
|
+
running the Phusion Passenger installer. If you only have one Ruby installation
|
630
|
+
(the case on most Linux systems), then you can skip this section because Phusion
|
631
|
+
Passenger will automatically detect it.</p></div>
|
632
|
+
<div class="paragraph"><p>To specify a Ruby installation, prepend your Ruby installation’s <tt>bin</tt>
|
630
633
|
directory to the <tt>PATH</tt> environment variable. For example, if you have the
|
631
634
|
following Ruby installations:</p></div>
|
632
635
|
<div class="ulist"><ul>
|
@@ -666,8 +669,8 @@ sudo apt-get update
|
|
666
669
|
sudo apt-get install libapache2-mod-passenger</tt></pre>
|
667
670
|
</div></div>
|
668
671
|
<h4 id="_installing_via_the_source_tarball">2.1.6. Installing via the source tarball</h4>
|
669
|
-
<div class="paragraph"><p>Extract the tarball to whatever location you prefer. The Phusion Passenger files
|
670
|
-
are to reside in that location permanently
|
672
|
+
<div class="paragraph"><p>Extract the tarball to whatever location you prefer. <strong>The Phusion Passenger files
|
673
|
+
are to reside in that location permanently.</strong> For example, if you would like
|
671
674
|
Phusion Passenger to reside in <tt>/opt/passenger-x.x.x</tt>:</p></div>
|
672
675
|
<div class="listingblock">
|
673
676
|
<div class="content">
|
@@ -696,6 +699,15 @@ installation. Furthermore, the <em>passenger-x.x.x</em> folder must be accessibl
|
|
696
699
|
on installing Phusion Passenger on OS X</a>.</p></div>
|
697
700
|
<h4 id="_ubuntu_linux">2.2.2. Ubuntu Linux</h4>
|
698
701
|
<div class="paragraph"><p>Ben Hughes has written an <a href="http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/">article on installing Phusion Passenger on Ubuntu</a>.</p></div>
|
702
|
+
<h4 id="_opensolaris">2.2.3. OpenSolaris</h4>
|
703
|
+
<div class="olist upperalpha"><ol class="upperalpha">
|
704
|
+
<li>
|
705
|
+
<p>
|
706
|
+
Aaron Farr has written a <a href="http://cubiclemuses.com/cm/articles/2009/04/09/rails-passenger-open-solaris-ec2/">guide</a>
|
707
|
+
about setting up Ruby on Rails and Phusion Passenger on OpenSolaris and EC2.
|
708
|
+
</p>
|
709
|
+
</li>
|
710
|
+
</ol></div>
|
699
711
|
</div>
|
700
712
|
<h2 id="_deploying_a_ruby_on_rails_application">3. Deploying a Ruby on Rails application</h2>
|
701
713
|
<div class="sectionbody">
|
@@ -1066,8 +1078,11 @@ Phusion Passenger’s behavior. Phusion Passenger’s Apache module supp
|
|
1066
1078
|
following configuration options:</p></div>
|
1067
1079
|
<h3 id="_passengerroot_lt_directory_gt">5.1. PassengerRoot <directory></h3>
|
1068
1080
|
<div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
|
1069
|
-
is essential to Phusion Passenger
|
1070
|
-
|
1081
|
+
is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
|
1082
|
+
data files. The correct value is given by the installer.</p></div>
|
1083
|
+
<div class="paragraph"><p>If you’ve moved Phusion Passenger to a different directory then you need to update
|
1084
|
+
this option as well. Please read
|
1085
|
+
<a href="#moving_phusion_passenger">Moving Phusion Passenger to a different directory</a> for more information.</p></div>
|
1071
1086
|
<div class="paragraph"><p>This required option may only occur once, in the global server configuration.</p></div>
|
1072
1087
|
<h3 id="_passengerloglevel_lt_integer_gt">5.2. PassengerLogLevel <integer></h3>
|
1073
1088
|
<div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
|
@@ -1237,7 +1252,7 @@ default.</p></div>
|
|
1237
1252
|
<div class="paragraph"><p>This option may only occur once, in the global server configuration.
|
1238
1253
|
The default value is <em>on</em>.</p></div>
|
1239
1254
|
<h3 id="PassengerDefaultUser">5.7. PassengerDefaultUser <username></h3>
|
1240
|
-
<div class="paragraph"><p>Passenger enables <a href="#user_switching">user switching support</a> by default.
|
1255
|
+
<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
|
1241
1256
|
This configuration option allows one to specify which user Rails/Rack
|
1242
1257
|
applications must run as, if user switching fails or is disabled.</p></div>
|
1243
1258
|
<div class="paragraph"><p>This option may only occur once, in the global server configuration.
|
@@ -1794,8 +1809,20 @@ process only takes about 40% of the time that is normally needed, assuming that
|
|
1794
1809
|
you’re using the <em>smart</em> <a href="#RailsSpawnMethod">spawning method</a>. So if your
|
1795
1810
|
system has enough memory, is it recommended that you set this option to a high
|
1796
1811
|
value or to <em>0</em>.</p></div>
|
1797
|
-
<div class="paragraph"><p>This option may
|
1798
|
-
|
1812
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
1813
|
+
<div class="ulist"><ul>
|
1814
|
+
<li>
|
1815
|
+
<p>
|
1816
|
+
In the global server configuration.
|
1817
|
+
</p>
|
1818
|
+
</li>
|
1819
|
+
<li>
|
1820
|
+
<p>
|
1821
|
+
In a virtual host configuration block.
|
1822
|
+
</p>
|
1823
|
+
</li>
|
1824
|
+
</ul></div>
|
1825
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
|
1799
1826
|
<h4 id="_railsappspawneridletime_lt_integer_gt">5.13.6. RailsAppSpawnerIdleTime <integer></h4>
|
1800
1827
|
<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
1801
1828
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
@@ -1809,8 +1836,20 @@ process only takes about 10% of the time that is normally needed, assuming that
|
|
1809
1836
|
you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#RailsSpawnMethod">spawning method</a>. So if your
|
1810
1837
|
system has enough memory, is it recommended that you set this option to a high
|
1811
1838
|
value or to <em>0</em>.</p></div>
|
1812
|
-
<div class="paragraph"><p>This option may
|
1813
|
-
|
1839
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
1840
|
+
<div class="ulist"><ul>
|
1841
|
+
<li>
|
1842
|
+
<p>
|
1843
|
+
In the global server configuration.
|
1844
|
+
</p>
|
1845
|
+
</li>
|
1846
|
+
<li>
|
1847
|
+
<p>
|
1848
|
+
In a virtual host configuration block.
|
1849
|
+
</p>
|
1850
|
+
</li>
|
1851
|
+
</ul></div>
|
1852
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>600</em> (10 minutes).</p></div>
|
1814
1853
|
<h3 id="_rack_specific_options">5.14. Rack-specific options</h3>
|
1815
1854
|
<h4 id="_rackautodetect_lt_on_off_gt">5.14.1. RackAutoDetect <on|off></h4>
|
1816
1855
|
<div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
|
@@ -2376,8 +2415,9 @@ This is a lot less than the 50 MB-ish memory usage as shown in the <em>VMSize</e
|
|
2376
2415
|
<td class="icon">
|
2377
2416
|
<img src="./images/icons/note.png" alt="Note" />
|
2378
2417
|
</td>
|
2379
|
-
<td class="content">
|
2380
|
-
provide facilities for determining processes' private dirty RSS
|
2418
|
+
<td class="content">Private dirty RSS reporting only works on Linux. Unfortunately other operating systems
|
2419
|
+
don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems,
|
2420
|
+
the Resident Set Size is reported instead.</td>
|
2381
2421
|
</tr></table>
|
2382
2422
|
</div>
|
2383
2423
|
<h3 id="_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</h3>
|
@@ -2404,7 +2444,8 @@ max
|
|
2404
2444
|
<dd>
|
2405
2445
|
<p>
|
2406
2446
|
The maximum number of application instances that Phusion Passenger will
|
2407
|
-
spawn. This equals the value given for <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a
|
2447
|
+
spawn. This equals the value given for <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a> (Apache)
|
2448
|
+
or <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a> (Nginx).
|
2408
2449
|
</p>
|
2409
2450
|
</dd>
|
2410
2451
|
<dt class="hdlist1">
|
@@ -2432,7 +2473,7 @@ inactive
|
|
2432
2473
|
<p>
|
2433
2474
|
The number of application instances that are currently <strong>not</strong> processing
|
2434
2475
|
requests, i.e. are idle. Idle application instances will be shutdown after a while,
|
2435
|
-
as can be specified with <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a> (unless this
|
2476
|
+
as can be specified with <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime (Apache)</a>/<a href="#PassengerPoolIdleTime">passenger_pool_idle_time (Nginx)</a> (unless this
|
2436
2477
|
value is set to 0, in which case application instances are never shut down via idle
|
2437
2478
|
time). The value of <em>inactive</em> equals <tt>count - active</tt>.
|
2438
2479
|
</p>
|
@@ -2561,12 +2602,13 @@ This feature is only available if Apache is started by <em>root</em>. This is th
|
|
2561
2602
|
Under no circumstances will applications be run as <em>root</em>. If
|
2562
2603
|
<em>environment.rb</em>/<em>config.ru</em> is owned as root or by an unknown user, then the
|
2563
2604
|
Rails/Rack application will run as the user specified by
|
2564
|
-
<a href="#PassengerDefaultUser">PassengerDefaultUser</a>.
|
2605
|
+
<a href="#PassengerDefaultUser">PassengerDefaultUser (Apache)</a>/<a href="#PassengerDefaultUser">passenger_default_user (Nginx)</a>.
|
2565
2606
|
</p>
|
2566
2607
|
</li>
|
2567
2608
|
</ul></div>
|
2568
2609
|
<div class="paragraph"><p>User switching can be disabled with the
|
2569
|
-
<a href="#PassengerUserSwitching">PassengerUserSwitching</a>
|
2610
|
+
<a href="#PassengerUserSwitching">PassengerUserSwitching (Apache)</a>/<a href="#PassengerUserSwitching">passenger_user_switching (Nginx)</a>
|
2611
|
+
option.</p></div>
|
2570
2612
|
<h3 id="reducing_memory_usage">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</h3>
|
2571
2613
|
<div class="paragraph"><p>Is it possible to reduce memory consumption of your Rails applications by 33% on average,
|
2572
2614
|
by using <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>.
|
@@ -2604,31 +2646,7 @@ namespace :deploy do
|
|
2604
2646
|
end
|
2605
2647
|
end</tt></pre>
|
2606
2648
|
</div></div>
|
2607
|
-
<
|
2608
|
-
created (it’ll show up in <tt>passenger-memory-stats</tt>). Indeed, Capistrano will deploy
|
2609
|
-
to a path ending with <em>/current</em> (ie : <em>/u/apps/yourapp/current</em>), so that you don’t
|
2610
|
-
have to care about revisions in your virtual host configuration. This <em>/current</em> directory
|
2611
|
-
is a symlink to the current revision deployed (<em>/path_to_app/releases/date_of_the_release</em>).
|
2612
|
-
Phusion Passenger recognizes applications by their full canonical path, so after
|
2613
|
-
deploying a new version, Phusion Passenger will think that the new version is
|
2614
|
-
a totally different application, thereby creating a new spawner server:</p></div>
|
2615
|
-
<div class="listingblock">
|
2616
|
-
<div class="content">
|
2617
|
-
<pre><tt>1001 30291 [...] Passenger ApplicationSpawner: /u/apps/my_app/releases/20080509104413
|
2618
|
-
1001 31371 [...] Passenger ApplicationSpawner: /u/apps/my_app/releases/20080509104632</tt></pre>
|
2619
|
-
</div></div>
|
2620
|
-
<div class="paragraph"><p>Don’t worry about this. The (old) spawner server will terminate itself after its
|
2621
|
-
timeout period (10 minutes by default), so you will not run out of memory.</p></div>
|
2622
|
-
<div class="paragraph"><p>If you really want to release the spawner server’s memory immediately, then you can add a command
|
2623
|
-
to your Capistrano script to terminate the Passenger spawn server after each deploy. That
|
2624
|
-
command is as follows:</p></div>
|
2625
|
-
<div class="listingblock">
|
2626
|
-
<div class="content">
|
2627
|
-
<pre><tt>kill $( passenger-memory-stats | grep 'Passenger spawn server' | awk '{ print $1 }' )</tt></pre>
|
2628
|
-
</div></div>
|
2629
|
-
<div class="paragraph"><p>Killing the spawn server is completely safe, because Phusion Passenger will restart the
|
2630
|
-
spawn server if it has been terminated.</p></div>
|
2631
|
-
<h3 id="_moving_phusion_passenger_to_a_different_directory">8.4. Moving Phusion Passenger to a different directory</h3>
|
2649
|
+
<h3 id="moving_phusion_passenger">8.4. Moving Phusion Passenger to a different directory</h3>
|
2632
2650
|
<div class="paragraph"><p>It is possible to relocate the Phusion Passenger files to a different directory. It
|
2633
2651
|
involves two steps:</p></div>
|
2634
2652
|
<div class="olist arabic"><ol class="arabic">
|
@@ -2676,14 +2694,7 @@ this command:</p></div>
|
|
2676
2694
|
<div class="paragraph"><p>where <em>X.X.X</em> is the version number of Ruby on Rails.</p></div>
|
2677
2695
|
<div class="paragraph"><p>All of these versions will exist in parallel, and will not conflict with each
|
2678
2696
|
other. Phusion Passenger will automatically make use of the correct version.</p></div>
|
2679
|
-
<h3 id="
|
2680
|
-
<div class="paragraph"><p>Phusion Passenger does not provide X-Sendfile support by itself. Please install
|
2681
|
-
<a href="http://tn123.ath.cx/mod_xsendfile/">mod_xsendfile</a> for X-Sendfile support.</p></div>
|
2682
|
-
<h3 id="_upload_progress">8.7. Upload progress</h3>
|
2683
|
-
<div class="paragraph"><p>Phusion Passenger does not provide upload progress support by itself. Please
|
2684
|
-
try drogus’s <a href="http://github.com/drogus/apache-upload-progress-module/tree/master">
|
2685
|
-
Apache upload progress module</a> instead.</p></div>
|
2686
|
-
<h3 id="_making_the_application_restart_after_each_request">8.8. Making the application restart after each request</h3>
|
2697
|
+
<h3 id="_making_the_application_restart_after_each_request">8.6. Making the application restart after each request</h3>
|
2687
2698
|
<div class="paragraph"><p>In some situations it might be desirable to restart the web application after
|
2688
2699
|
each request, for example when developing a non-Rails application that doesn’t
|
2689
2700
|
support code reloading, or when developing a web framework.</p></div>
|
@@ -2704,7 +2715,7 @@ or when you’re not developing a Rails application and your web framework
|
|
2704
2715
|
does not support code reloading.</td>
|
2705
2716
|
</tr></table>
|
2706
2717
|
</div>
|
2707
|
-
<h3 id="sub_uri_deployment_uri_fix">8.
|
2718
|
+
<h3 id="sub_uri_deployment_uri_fix">8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
|
2708
2719
|
<div class="paragraph"><p>Some people experience broken images and other broken static assets when they
|
2709
2720
|
deploy their application to a sub-URI (i.e. <em>http://mysite.com/railsapp/</em>).
|
2710
2721
|
The reason for this usually is that you used a
|
@@ -2739,6 +2750,13 @@ so that your images will always work no matter what sub-URI you’ve deploye
|
|
2739
2750
|
append a timestamp to the URI to better facilitate HTTP caching. For more information,
|
2740
2751
|
please refer to
|
2741
2752
|
<a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">the Rails API docs</a>.</p></div>
|
2753
|
+
<h3 id="_x_sendfile_support">8.8. X-Sendfile support</h3>
|
2754
|
+
<div class="paragraph"><p>Phusion Passenger does not provide X-Sendfile support by itself. Please install
|
2755
|
+
<a href="http://tn123.ath.cx/mod_xsendfile/">mod_xsendfile</a> for X-Sendfile support.</p></div>
|
2756
|
+
<h3 id="_upload_progress">8.9. Upload progress</h3>
|
2757
|
+
<div class="paragraph"><p>Phusion Passenger does not provide upload progress support by itself. Please
|
2758
|
+
try drogus’s <a href="http://github.com/drogus/apache-upload-progress-module/tree/master">
|
2759
|
+
Apache upload progress module</a> instead.</p></div>
|
2742
2760
|
</div>
|
2743
2761
|
<h2 id="_appendix_a_about_this_document">9. Appendix A: About this document</h2>
|
2744
2762
|
<div class="sectionbody">
|
@@ -2964,12 +2982,12 @@ Passenger is creating a new worker process. Phusion Passenger provides the API
|
|
2964
2982
|
call <tt>PhusionPassenger.on_event(:starting_worker_process)</tt> to do so. So you
|
2965
2983
|
could insert the following code in your <em>environment.rb</em>:</p></div>
|
2966
2984
|
<div class="listingblock">
|
2967
|
-
<div class="content"><!-- Generator: GNU source-highlight 2.
|
2985
|
+
<div class="content"><!-- Generator: GNU source-highlight 2.11.1
|
2968
2986
|
by Lorenzo Bettini
|
2969
2987
|
http://www.lorenzobettini.it
|
2970
2988
|
http://www.gnu.org/software/src-highlite -->
|
2971
2989
|
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
|
2972
|
-
PhusionPassenger<span style="color: #990000">.</span
|
2990
|
+
PhusionPassenger<span style="color: #990000">.</span>on_event<span style="color: #990000">(:</span>starting_worker_process<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>forked<span style="color: #990000">|</span>
|
2973
2991
|
<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> forked
|
2974
2992
|
<span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
|
2975
2993
|
<span style="color: #990000">...</span> code to reestablish socket connections here <span style="color: #990000">...</span>
|
@@ -3057,12 +3075,12 @@ Memcached is forced to handle this as an error.</p></div>
|
|
3057
3075
|
<div class="paragraph"><p>Worker process 2 now has its own, separate communication channel with Memcached.
|
3058
3076
|
The code in <em>environment.rb</em> looks like this:</p></div>
|
3059
3077
|
<div class="listingblock">
|
3060
|
-
<div class="content"><!-- Generator: GNU source-highlight 2.
|
3078
|
+
<div class="content"><!-- Generator: GNU source-highlight 2.11.1
|
3061
3079
|
by Lorenzo Bettini
|
3062
3080
|
http://www.lorenzobettini.it
|
3063
3081
|
http://www.gnu.org/software/src-highlite -->
|
3064
3082
|
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
|
3065
|
-
PhusionPassenger<span style="color: #990000">.</span
|
3083
|
+
PhusionPassenger<span style="color: #990000">.</span>on_event<span style="color: #990000">(:</span>starting_worker_process<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>forked<span style="color: #990000">|</span>
|
3066
3084
|
<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> forked
|
3067
3085
|
<span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
|
3068
3086
|
reestablish_connection_to_memcached
|
@@ -3087,12 +3105,12 @@ then those threads will no longer be running in newly created worker process.
|
|
3087
3105
|
You need to revive them when a new worker process is created. Use the
|
3088
3106
|
<tt>:starting_worker_process</tt> event that Phusion Passenger provides, like this:</p></div>
|
3089
3107
|
<div class="listingblock">
|
3090
|
-
<div class="content"><!-- Generator: GNU source-highlight 2.
|
3108
|
+
<div class="content"><!-- Generator: GNU source-highlight 2.11.1
|
3091
3109
|
by Lorenzo Bettini
|
3092
3110
|
http://www.lorenzobettini.it
|
3093
3111
|
http://www.gnu.org/software/src-highlite -->
|
3094
3112
|
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
|
3095
|
-
PhusionPassenger<span style="color: #990000">.</span
|
3113
|
+
PhusionPassenger<span style="color: #990000">.</span>on_event<span style="color: #990000">(:</span>starting_worker_process<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>forked<span style="color: #990000">|</span>
|
3096
3114
|
<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> forked
|
3097
3115
|
<span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
|
3098
3116
|
<span style="color: #990000">...</span> code to revive threads here <span style="color: #990000">...</span>
|
@@ -3120,7 +3138,7 @@ has no effect.</p></div>
|
|
3120
3138
|
</div>
|
3121
3139
|
<div id="footer">
|
3122
3140
|
<div id="footer-text">
|
3123
|
-
Last updated 2009-
|
3141
|
+
Last updated 2009-04-16 19:42:11 CEST
|
3124
3142
|
</div>
|
3125
3143
|
</div>
|
3126
3144
|
</body>
|