This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/ngx_http_headers_more_headers_in.c b/src/ngx_http_headers_more_headers_in.c | |
index c3eb8f7..527c8a5 100644 | |
--- a/src/ngx_http_headers_more_headers_in.c | |
+++ b/src/ngx_http_headers_more_headers_in.c | |
@@ -739,6 +739,7 @@ ngx_http_set_connection_header(ngx_http_request_t *r, | |
if (ngx_strcasestrn(value->data, "close", 5 - 1)) { | |
r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; | |
r->headers_in.keep_alive_n = -1; | |
+ r->keepalive = 0; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/starter.go b/starter.go | |
index c65ce00..4d47000 100644 | |
--- a/starter.go | |
+++ b/starter.go | |
@@ -517,7 +517,6 @@ func (s *Starter) StartWorker(sigCh chan os.Signal, ch chan processState) *os.Pr | |
sigs = append(sigs, sig) | |
} | |
} | |
- | |
// if received any signals, during the wait, we bail out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use JSON; | |
sub cap_cmd { | |
my ($cmdref) = @_; | |
pipe my $logrh, my $logwh | |
or die "Died: failed to create pipe:$!\n"; | |
my $pid = fork; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use IO::Handle; | |
use Getopt::Long; | |
use File::Spec; | |
sub find_path { | |
my $pg = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use JSON; | |
sub cap_cmd { | |
my ($cmdref) = @_; | |
pipe my $logrh, my $logwh | |
or die "Died: failed to create pipe:$!\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl stats_elb.pl --region us-west-2 --elb ProdElb | mkr throw --service production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Storable; | |
use JSON; | |
use File::Spec; | |
sub cap_cmd { | |
my ($cmdref) = @_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Digest::MD5 qw/md5_hex/; | |
use File::Spec; | |
use File::Temp qw(tempfile); | |
use Getopt::Long; | |
use File::Copy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Server | |
EC2 c4.8xlarge | |
Amazon Linux | |
## Software | |
``` | |
sudo yum install -y make gcc git curl tar bzip2 patch nginx openssl-devel strace | |
git clone https://github.com/tagomoris/xbuild.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# gem install pico_http_parser proc-wait3 | |
# start_server --port 8080 --signal-on-hup=USR1 -- rackup -r ./starlet.rb -E production -s Starlet \ | |
# -O MaxWorkers=1 -O MaxRequestPerChild=1000 -O MinRequestPerChild=500 -O SpawnInterval=1 config.ru | |
# | |
require 'rubygems' | |
require 'rack' | |
require 'pico_http_parser' |