RE: help with issue related to ngx_peer_connection_t, and ngx_unix_recv() returning NGX_AGAIN

2013-08-16 Thread Abbot, Drew
Update: I've realized that by setting peer.rcvbuf such that the setsockopt(s, SOL_SOCKET, SO_RCVBUF, ..) call in the beginning of ngx_event_connect_peer() is hit, my socket buffer size can be made larger, and the effect of NGX_AGAIN being returned on the 2nd call isn't really significant anymore

Re: cache for ngx_http_time()

2013-08-16 Thread Maxim Dounin
Hello! On Mon, Aug 05, 2013 at 09:06:57PM +0300, Serguei I. Ivantsov wrote: > ngx_http_time() is called once per request and it call a heavy > ngx_sprintf() function. > Why not cache the output for one second (resolution of time_t)? > I find nice time caching framework on ngx_times.c, with slots

Re: help with issue related to ngx_peer_connection_t, and ngx_unix_recv() returning NGX_AGAIN

2013-08-16 Thread Maxim Dounin
Hello! On Thu, Aug 15, 2013 at 11:25:24PM +0200, Abbot, Drew wrote: [...] > That approach seemed ok at first, but I've been noticing strange > behavior on the non-blocking sockets within my_read_handler(). > In particular, I call ngx_unix_recv() in my_read_handler() to > actually receive dat

Only fire a handler once

2013-08-16 Thread Aaron Bedra
I'm looking for a way to make sure a handler only fires once. For instance, in Apache, you can use the guard: if (!ap_is_initial_req(r)) { skip handling } Is there anything like this? I couldn't find any documentation for it. Thanks, Aaron ___ nginx-d