Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kazeburo's full-sized avatar

Masahiro Nagano kazeburo

View GitHub Profile
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;
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
#!/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;
#!/usr/bin/perl
use strict;
use warnings;
use IO::Handle;
use Getopt::Long;
use File::Spec;
sub find_path {
my $pg = shift;
#!/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";
$ perl stats_elb.pl --region us-west-2 --elb ProdElb | mkr throw --service production
#!/usr/bin/perl
use strict;
use warnings;
use Storable;
use JSON;
use File::Spec;
sub cap_cmd {
my ($cmdref) = @_;
#!/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;
## 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
@kazeburo
kazeburo / starlet.rb
Last active August 29, 2015 14:10
ruby port of Starlet and Parallel::Prefork
# -*- 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'