-
-
Save oschaaf/2382c735e29f4c960b1e3ca1dacc22fd to your computer and use it in GitHub Desktop.
bump ngx_pagespeed pipe buffers
This file contains 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_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