Skip to content

Instantly share code, notes, and snippets.

@oschaaf
Last active February 16, 2017 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oschaaf/2382c735e29f4c960b1e3ca1dacc22fd to your computer and use it in GitHub Desktop.
Save oschaaf/2382c735e29f4c960b1e3ca1dacc22fd to your computer and use it in GitHub Desktop.
bump ngx_pagespeed pipe buffers
diff --git a/src/ngx_event_connection.cc b/src/ngx_event_connection.cc
index c70f4ad..defaec8 100644
--- a/src/ngx_event_connection.cc
+++ b/src/ngx_event_connection.cc
@@ -52,6 +52,13 @@ bool NgxEventConnection::Init(ngx_cycle_t* cycle) {
} else {
pipe_read_fd_ = file_descriptors[0];
pipe_write_fd_ = file_descriptors[1];
+
+ long old_pipe_size, pipe_size;
+
+ old_pipe_size = (long)fcntl(pipe_write_fd_, F_GETPIPE_SZ);
+ pipe_size = fcntl(pipe_write_fd_, F_SETPIPE_SZ, 200*1024);
+ ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
+ "pagespeed: bumped write pipe side: %l -> %l", old_pipe_size, pipe_size);
return true;
}
close(file_descriptors[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment