I've tried building 1.1.3 using a bunch of patches provided by Maxim.
They're here: https://github.com/perusio/nginx-mdounin-patches
With these I was able to get a clean build of 1.1.2.
Applying the same set of patches to 1.1.3 doesn't raise any issues
when patching. What happens is that the build process fails when
compiling the ngx_http_fastcgi module.
This is the compiler error message:
/ngx_http_fastcgi_module.c:1664:32: error: ‘ngx_http_upstream_t’ has no member named ‘keepalive’
I'm using the separate module for ngx_http_upstream keepalive. It's
not in core.
There's a struct that is lacking a member related to the upstream
Any idea of what's going on? I know that "my" set of patches is
"uncommon". Nevertheless I find it a bit strange that the build fails
with 1.1.3 while is successful with 1.1.2.
The upstream keepalive patches are taken from Maxim's patch queue
posted earlier this month on this list.
I am starting to write a new module that uses a header token. I have
searched google for the answer about "how to seach in headers for a
name. I want to search for "X-session-token". I am surprised that
there is not a library function that just does the search,
As I understand it now every module that wants to search for a header
writes it own search function?
Is there a "library search function"?
once I have the session token I use memcached in the PREACCESS phase to
load the session info, then in the ACCESS phase check the access permission.
The following 2 patches address the issue seen with long lived requests:
they tend to consume lots of memory over time if chunked encoding is used,
and the memory is only freed after request termination.
First patch introduce buffers reuse in chunked filter. It mostly resolves
the problem, though there is still small "leak" related to chain links
(ngx_chain_t structures, 2 pointers) not always being reused.
Second patch introduce proper reuse of chain links, though it requires
API change in ngx_chain_update_chains() function. We may introduce
another function to preserve API, but I'm not really sure we want to.
Here is my generic patch queue. Posting it here for furher review
(mostly by Igor before he approves commits, but if you have something
to say - please do so).
Most of the patches were already posted previously, though there are
some new ones.
Here is the keepalive patch queue, posting it here for further
review and testing. Note this series is for nginx 1.1.1, first 2
patches were already committed into trunk (just skip them if you are
working with svn trunk).
This series includes multiple fixes for problems found during
testing since last post:
- https connection caching support;
- better detection of connections which can't be cached;
- cpu hog in round-robin balancer;
- segmentation fault when using with proxy_cache/fastcgi_cache;
FastCGI keepalive support now requires "fastcgi_keep_conn on;" in config.
Without the directive previous behaviour is preserved to make patches less
Upstream keepalive module is included as a last patch, it's compiled in by
All patches may be found here: