-
Notifications
You must be signed in to change notification settings - Fork 2.5k
add ngx_debug_conn to show connection usage. #1127
New issue
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
Conversation
|
| /* c->data: http request */ | ||
|
|
||
| if (c->data != NULL) { | ||
| r = (ngx_http_request_t *) c->data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the c->data could be ngx_http_request_t, ngx_http_v2_connection_t, ngx_stream_session_t or other stuff filled by the Nginx module. We could not safely assume it must be ngx_http_request_t.
I comment here because I am looking up a way to get the ngx_http_request_t via a given ngx_connection_t. If you find one, please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's known issue.
I comment here because I am looking up a way to get the ngx_http_request_t via a given ngx_connection_t. If you find one, please let me know.
It seems that there is no good way to determine c->data type.
Maybe we add ngx_connection_t:data_type field, which is not a very good way.
|
TODO: Note that we still need 2 fixes for this module.
|
chobits
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
add ngx_debug_conn to show connection usage.
Directive
Syntax: debug_conn
Default:
noneContext:
server, locationThe information of nginx connection usage will be accessible from the surrounding location.