Skip to content

Commit

Permalink
no more than 1 'async queue is full' message per-second
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto@debian32 committed Jun 12, 2011
1 parent ef7baba commit de112b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion async.c
Expand Up @@ -202,6 +202,8 @@ void *async_loop(void *arg1) {
int is_a_new_connection;
int proto_parser_status;

time_t now, last_now = 0;

static struct uwsgi_async_request *current_request = NULL, *next_async_request = NULL;

void *events = event_queue_alloc(64);
Expand Down Expand Up @@ -260,7 +262,11 @@ void *async_loop(void *arg1) {

uwsgi.wsgi_req = find_first_available_wsgi_req();
if (uwsgi.wsgi_req == NULL) {
uwsgi_log("async queue is full !!!\n");
now = time(NULL);
if (now > last_now) {
uwsgi_log("async queue is full !!!\n");
last_now = now;
}
break;;
}

Expand Down

0 comments on commit de112b7

Please sign in to comment.