We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi,
ngx module code ::
/* Fetch the chunk from mongo */ do { e = FALSE; cursors[i] = gridfile_get_chunks(&gfile, i, 1); if (!(cursors[i] && mongo_cursor_next(cursors[i]) == MONGO_OK)) { e = TRUE; ecounter++; if (ecounter > MONGO_MAX_RETRIES_PER_REQUEST || ngx_http_mongo_reconnect(request->connection->log, mongo_conn) == NGX_ERROR || ngx_http_mongo_reauth(request->connection->log, mongo_conn) == NGX_ERROR) { ngx_log_error(NGX_LOG_ERR, request->connection->log, 0, "Mongo connection dropped, could not reconnect"); if(&mongo_conn->conn.connected) { mongo_disconnect(&mongo_conn->conn); } gridfile_destroy(&gfile); gridfs_destroy(&gfs); return NGX_HTTP_SERVICE_UNAVAILABLE; } } } while (e);
this will call mongo_cursor_get_more::
mongo_cursor_get_more
static int mongo_cursor_get_more( mongo_cursor *cursor ) { int res; ... mm = mongo_message_create( 16 /*header*/ +4 /*ZERO*/ +sl +4 /*numToReturn*/ +8 /*cursorID*/ , 0, 0, MONGO_OP_GET_MORE ); res = mongo_message_send( cursor->conn, mm ); res = mongo_read_response( cursor->conn, &( cursor->reply ) ); } static int mongo_read_response( mongo *conn, mongo_reply **reply ) { mongo_env_read_socket( conn, &head, sizeof( head ) ); //which will do a blocking read. ... }
the blocking read will block nginx worker, other request will be blocked.
have you make any benchmark on this module?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi,
ngx module code ::
this will call
mongo_cursor_get_more
::the blocking read will block nginx worker, other request will be blocked.
have you make any benchmark on this module?
The text was updated successfully, but these errors were encountered: