details: https://github.com/nginx/nginx/commit/311c39037734df89b56325091e9435bc542308f4 branches: master commit: 311c39037734df89b56325091e9435bc542308f4 user: Sergey Kandaurov <pluk...@nginx.com> date: Fri, 21 Feb 2025 15:41:33 +0400 description: SSL: improved logging of saving sessions from upstream servers.
This makes it easier to understand why sessions may not be saved in shared memory due to size. --- src/http/ngx_http_upstream_round_robin.c | 6 +++--- src/stream/ngx_stream_upstream_round_robin.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 6b4ff97f2..25741869e 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -952,11 +952,11 @@ ngx_http_upstream_save_round_robin_peer_session(ngx_peer_connection_t *pc, return; } - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, - "save session: %p", ssl_session); - len = i2d_SSL_SESSION(ssl_session, NULL); + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0, + "save session: %p:%d", ssl_session, len); + /* do not cache too big session */ if (len > NGX_SSL_MAX_SESSION_SIZE) { diff --git a/src/stream/ngx_stream_upstream_round_robin.c b/src/stream/ngx_stream_upstream_round_robin.c index 27db0851e..1dae4e538 100644 --- a/src/stream/ngx_stream_upstream_round_robin.c +++ b/src/stream/ngx_stream_upstream_round_robin.c @@ -985,11 +985,11 @@ ngx_stream_upstream_save_round_robin_peer_session(ngx_peer_connection_t *pc, return; } - ngx_log_debug1(NGX_LOG_DEBUG_STREAM, pc->log, 0, - "save session: %p", ssl_session); - len = i2d_SSL_SESSION(ssl_session, NULL); + ngx_log_debug2(NGX_LOG_DEBUG_STREAM, pc->log, 0, + "save session: %p:%d", ssl_session, len); + /* do not cache too big session */ if (len > NGX_SSL_MAX_SESSION_SIZE) { _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel