L
L
LakeForest2022-01-10 11:11:12
Python
LakeForest, 2022-01-10 11:11:12

Why does Nginx drop gRPC connection when load testing through Locust after a while? How to fix?

*23735 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.22.0.4, server: , request: "POST /SpeechToTextService/StreamingRecognize HTTP/2.0", upstream: " grpc://172.22. 0.2:8119 ", host: " nginx:8558 "

What is the correct way to make sure that the connection is not dropped or terminated when I think the request is completed? I understand that nginx holds the connection between containers for a while.
http {
    fastcgi_read_timeout 300;
    proxy_read_timeout 300;
    uwsgi_read_timeout 300;
}

server {
    listen 8558 http2;
    charset utf-8;
    location / {
        grpc_pass grpc://stt:8119;
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question