jolibrain / deepdetect

Deep Learning API and Server in C++14 support for Caffe, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
https://www.deepdetect.com/
Other
2.52k stars 560 forks source link

TCP error 104 #777

Open vd3d opened 4 years ago

vd3d commented 4 years ago

Hi,

Problem description

I have a DD instance running on Debian with docker (CPU only), but when calling the "predict" endpoint I receive a TCP error code 104 ( Connection reset by peer).

I test on my local machine and it seems to work !

Here is the request on the predict API

{
    "service":"imageserv",
    "parameters":{
        "input":{
            "width":224,
            "height":224
        },
        "output":{
            "best":3
        },
        "mllib":{
            "gpu":false
        }
    },
    "data":[
        "https://cdn.socloze.com/cdn/e_b3ddc575-2b50-40e2-a214-a221d657683e/024e005788a53365323b39f6ec313ea2.jpg"
    ]
}

Observations

Even in the worst case, I should receive an error... the DD server should not close the connection, right ?

I checked the logs and sometimes I got this, without any additional info:

l5sm0 [2020-08-25 16:54:50.150] [api] [error] 10.0.4.219 "POST /services/imageserv" 500 2

Notices

Error 104 :

This can happen if the other side crashes and then comes back up or if it calls close() on the socket while there is data from you in transit, and is an indication to you that some of the data that you previously sent may not have been received.

beniz commented 4 years ago

Hi, you'd need to post your API calls, etc as requested in the issue template. Thanks!

vd3d commented 4 years ago

Done. Sorry ;-)

vd3d commented 4 years ago

Still any idea of the problem ?

beniz commented 4 years ago

You really need to post all docker and API calls, output logs, etc... so someone can try to reproduce to help you. Otherwise if you put yourself in our seat, it is difficult to understand what you are doing here. So it works on your laptop, but doesn't elsewhere ? Have you checked you have the same memory etc...