Some times header cannot be sent due too high traffic

Hung Nguyen hungnv at opensource.com.vn
Thu Sep 24 09:18:42 UTC 2015


Hello, 

In my module I do something like this:
	nlog->action = "sending file to client";
        r->headers_out.status = NGX_HTTP_OK;
        r->headers_out.content_length_n = bucket->content_length;
        r->headers_out.last_modified_time = of.mtime;
        r->headers_out.content_type.len = sizeof ("text/html") - 1;
        r->headers_out.content_type.data = (u_char *) "text/html";
        rc = ngx_http_send_header(r);
        if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
            ngx_log_error(NGX_LOG_ALERT, nlog, ngx_errno, ngx_close_file_n "ngx_http_send_header failed");
            return rc;
        }


it’s ok when traffic is low, but when there are many user request to nginx, error log is full of these similar errors:

2015/09/17 08:57:16 [alert] 9915#0: *5205 close()ngx_http_send_header failed while sending file to client, client: 127.0.0.1, server: my.local, request: "GET /slides/128553.pdf?secl=LMz1w4xNwd9pt_88-ROxkw&sect=1442496276 HTTP/1.0", host: “m <http://kvazar.china-cdn88nmbwacdnln8hq8qwe.com/>y.server.com", referrer: "http://my.server.com/uppod.swf <http://uakino.net/uppod.swf>”



Is this a normal behavior, or there much be something wrong in my module cause nginx cannot send header to client? 


Thanks,

Hưng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150924/fa5161d3/attachment.html>


More information about the nginx-devel mailing list