Skip to content

Instantly share code, notes, and snippets.

@oschaaf
Last active Feb 16, 2017
Embed
What would you like to do?
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