openvinotoolkit / openvinotoolkit/model_server

[Bug]: Connection reset by peer code 14.

Open
#2,243 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
931
Forks
277
Avg merge
2d 13h
Merged PRs (30d)
68

Description

OpenVINO Version

2023.0

Operating System

Ubuntu 20.04 (LTS)

Device used for inference

CPU

Framework

PyTorch

Model used

No response

Issue description

I'm usign GRPC to make requests to predict service. When I run it on a local machine I have no problems, but when I deploy it on AWS, I sometimes get "Connection Reset By Peer Error". It doesn't follow a sequence, that is, It happens ramdomly and I need to reopen the channel.
I am using a python API creating connection and using predict endpoint in this way:

self.channel = grpc.insecure_channel('{host}:{port}'.format(host=self.host, port=self.port),options=self.options)
stub = prediction_service_pb2_grpc.PredictionServiceStub(self.channel)

request = predict_pb2.PredictRequest()
request.model_spec.name = self.model_name
request.model_spec.signature_name = self.signature_name
result = stub.Predict(request, 30, wait_for_ready=True)
return result

I have the following configuration:

grpc.max_message_length = 100 * 1024 *1024
grpc.max_receive_message_length = 128 * 1024 *1024
grpc.enable_http_proxy = 0
grpc.keepalive_time_ms =  2147483647
grpc.max_connection_idle_ms' = 2147483647
grpc.max_connection_age_ms = 2147483647
grpc.max_connection_age_grace_ms = 2147483647
grpc.client_idle_timeout_ms=  2147483647
Step-by-step reproduction

No response

Relevant log output
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "Connection reset by peer"
	debug_error_string = "{"created":"@1699622642.536271816","description":"Error received from peer ipv4:x.x.x.x:9000","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"Connection reset by peer","grpc_status":14}"
Issue submission checklist
  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python gRPC channel configuration and the PredictionServiceStub.Predict call shown in the report. Reproduce the intermittent reset in the AWS deployment and compare client and server logs around the StatusCode.UNAVAILABLE error. Done means identifying a reproducible cause and validating a fix or documented workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.