Commit Graph

14 Commits

Author SHA1 Message Date
Jeremy Kemper 2a92995d2a Only wrap request processing with our USR1 signal handler so FastCGI can trap it and raise an exception while waiting for connections. Idle processes exit immediately rather than waiting for another request; active processes gracefully exit when the request is finished.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5485 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-11 08:08:53 +00:00
Jeremy Kemper f6339eb177 Thoroughly test the FCGI dispatcher. Closes #5970.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 00:18:31 +00:00
Jeremy Kemper 12ff554cd4 Tighten rescue clauses. Closes #5985.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-31 03:16:28 +00:00
David Heinemeier Hansson 03acf48817 Added SIGTRAP signal handler to RailsFCGIHandler that'll force the process into a breakpoint after the next request. This breakpoint can then be caught with script/breakpointer and give you access to the Ruby image inside that process. Useful for debugging memory leaks among other things [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 06:25:47 +00:00
Jamis Buck 49cd52a93f Make fcgi handler respond to TERM signals with an explicit exit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-02 13:21:22 +00:00
David Heinemeier Hansson e646786a76 Refactored cleanly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-13 20:04:13 +00:00
David Heinemeier Hansson 00e085f5a5 Solved the hanging issue.. USR2 is now the preferred way of restarting FCGIs!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 19:39:12 +00:00
David Heinemeier Hansson 8e4f27a50a Solved the hanging issue.. USR2 is now the preferred way of restarting FCGIs!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 19:31:41 +00:00
David Heinemeier Hansson ac8f76b521 Dont log it twice
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 08:55:04 +00:00
David Heinemeier Hansson b7faeb20e9 Added in-process restarting on USR2 -- still missing a good way to free up the socket, so not a complete solution yet.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 08:38:26 +00:00
David Heinemeier Hansson 7077d8bb3d Dropped the 'immediate close-down' of FCGI processes since it didn't work consistently and produced bad responses when it didn't. So now a TERM ensures exit after the next request (just as if the process is handling a request when it receives the signal). This means that you'll have to 'nudge' all FCGI processes with a request in order to ensure that they have all reloaded. This can be done by something like ./script/process/repear --nudge 'http://www.myapp.com' --instances 10, which will load the myapp site 10 times (and thus hit all of the 10 FCGI processes once, enough to shut down).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-19 18:53:48 +00:00
David Heinemeier Hansson 6e319ccce2 Added an EXPERIMENTAL gateway.cgi for getting high-speed performance through vanilla CGI using a long-running, DRb-backed server in the background (using script/listener and script/tracker) #1603 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 19:06:50 +00:00
Jeremy Kemper 5650bc9094 r1588@asus: jeremy | 2005-07-02 03:14:45 -0700
Optional periodic garbage collection for dispatch.fcgi.  Graceful exit on TERM also (a la Apache1).  Ignore signals the platform does not support, such as USR1 on Windows.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-02 04:52:14 +00:00
Jamis Buck 3cc47a4297 Use SIGHUP to dynamically reload an fcgi process without restarting it. Refactored dispatch.fcgi so that the RailsFCGIHandler is in the lib dir.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-29 11:07:20 +00:00