ConnectionClosedError: Connection was closed before we received a valid response from endpoint URL:

Question:

So I’m trying to figure out Sagemaker and can get an endpoint for a tensorflow model up and running. Strangely enough, when I send small images to it, up to 220×220 (40kb), it runs just fine! However I get a connection closed error when I try anything larger, say 225×225.

I’ve tried from different networks and computers and get the same error. Also, I don’t think I’m anywhere near the 5MB limit for sagemaker requests so I must admit I’m stumped on this one. Anyone happen to know what might be the cause of this? Thanks for your help.
I’m calling my model via boto as follows:

The error I get is:

Answer:

It can be a network error.
If you are connected to a VPN , try after disconnecting it
try with better internet connection
my case, closing the VPN worked

Leave a Reply