Project

General

Profile

Actions

Bug #23115

open

fcgi's connection is not closed properly when fastcgi_keep_conn is enabled

Added by Zongyou Yao about 6 years ago. Updated almost 6 years ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

nginx's config:

    upstream rgws {
            server 127.0.0.1:8085;
    }   

    server {
        listen       8081 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
            root   html;
            fastcgi_connect_timeout 300;  
            fastcgi_send_timeout 300;  
            fastcgi_read_timeout 300;  
            fastcgi_buffer_size 64k;  
            fastcgi_buffers 4 64k;  
            fastcgi_keep_conn on;
            fastcgi_busy_buffers_size 128k;  
            fastcgi_temp_file_write_size 128k;  

            fastcgi_pass_header Authorization;
            fastcgi_pass_request_headers on;
            fastcgi_param QUERY_STRING  $query_string;
            fastcgi_param REQUEST_METHOD $request_method;
            fastcgi_param CONTENT_LENGTH $content_length;
            fastcgi_param CONTENT_LENGTH $content_length;

            include fastcgi_params;
            fastcgi_pass rgws;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

rgw's config:

[client.rgw]

        rgw_frontends = "fastcgi, civetweb port=7480" 
        rgw_host = *
        rgw_port = 8085
        ; rgw frontends = civetweb port=8000
        ; needed for s3tests
        rgw crypt s3 kms encryption keys = testkey-1=YmluCmJvb3N0CmJvb3N0LWJ1aWxkCmNlcGguY29uZgo= testkey-2=aWIKTWFrZWZpbGUKbWFuCm91dApzcmMKVGVzdGluZwo=
        rgw crypt require ssl = false
        rgw lc debug interval = 10

after execute `curl http://127.0.0.1:8081`, rgw has some connection in CLOSE_WAIT state, the connection is not closed:

radosgw 39455 root 39u IPv4 160037039 0t0 TCP *:7480 (LISTEN)
radosgw 39455 root 40u IPv4 159993706 0t0 TCP *:8085 (LISTEN)
radosgw 39455 root 41u IPv4 160009940 0t0 TCP localhost:8085->localhost:44504 (CLOSE_WAIT)

the last FIN is not sent, see fcgi_bug.pcap in the attachment.


Files

fcgi_bug.pcap (2.11 KB) fcgi_bug.pcap Zongyou Yao, 02/24/2018 03:05 PM
Actions #2

Updated by Zongyou Yao about 6 years ago

the last FIN is sent until `FCGX_Accept_r` is called on the same FCGX_Request in `QueueRing<FCGX_Request*> qr(max_connections);`

Actions #3

Updated by Orit Wasserman almost 6 years ago

  • Status changed from New to Won't Fix
Actions #4

Updated by Orit Wasserman almost 6 years ago

  • Status changed from Won't Fix to Fix Under Review
  • Assignee set to Matt Benjamin
Actions

Also available in: Atom PDF