Welcome! Log In Create A New Profile

Advanced

Re: Implementing a non-blocking delay between request and response

January 15, 2010 01:25PM
Two problems solved, one more found:

Solved:

1. I wasn't specifying a wakeupFromSleep->log, so I was seg faulting on the:

ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
"event timer add: %d: %M:%M",
ngx_event_ident(ev->data), timer, ev->timer.key);

line in ngx_event_add_timer from ngx_event_timer.h

2. I was specifying seconds, not ms. The line should correctly read:

ngx_add_timer(wakeupFromSleep, 30000);

Found:

Like before, the connection is closing immediately, even though the event is in fact waking up. The only way I seem to be able to have it not close immediate is to set r->keepalive = 1, which closes when the event times out, but doesn't send my headers. So, like my original question, I still need a way to keep the connection open until the event times out and can send the headers and finalize the response (in 0.7.64, I'm hoping to not have to move to a later version if I can avoid it).

Thanks!
Subject Author Posted

Implementing a non-blocking delay between request and response

Tronman January 14, 2010 02:26PM

Re: Implementing a non-blocking delay between request and response

Marcus Clyne January 14, 2010 08:02PM

Re: Implementing a non-blocking delay between request and response

agentzh January 14, 2010 08:52PM

Re: Implementing a non-blocking delay between request and response

agentzh January 14, 2010 09:38PM

Re: Implementing a non-blocking delay between request and response

Tronman January 15, 2010 09:43AM

Re: Implementing a non-blocking delay between request and response

Tronman January 15, 2010 10:02AM

Re: Implementing a non-blocking delay between request and response

Tronman January 15, 2010 12:28PM

Re: Implementing a non-blocking delay between request and response

Tronman January 15, 2010 01:25PM

Re: Implementing a non-blocking delay between request and response

Tronman January 15, 2010 02:11PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready