I have a web service in a Docker image to which I am trying to upload two files: a 6MB file and an 18MB file.
When running in my local Docker service, both files upload fine.
With the same image in ECS, only the 6MB file successfully uploads.
Successful 6MB upload:
C:\>curl -v -F [email protected] http://52.xxx.xxx.xxx:5000/api/v1/add_model
* Trying 52.xxx.xxx.xxx...
* TCP_NODELAY set
* Connected to 52.xxx.xxx.xxx (52.xxx.xxx.xxx) port 5000 (#0)
> POST /classifierService/api/v1/add_model HTTP/1.1
> Host: 52.xxx.xxx.xxx:5000
> User-Agent: curl/7.57.0
> Accept: */*
> Content-Length: 6526998
> Content-Type: multipart/form-data; boundary=------------------------51a3998e86a60e5c
> Expect: 100-continue
>
* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 68178
<
<response body>
The 18MB file, however, fails with an empty response.
Unsuccessful 18MB upload:
C:\>curl -v -F [email protected] http://52.xxx.xxx.xxx:5000/api/v1/add_model
* Trying 52.xxx.xxx.xxx...
* TCP_NODELAY set
* Connected to 52.xxx.xxx.xxx (52.xxx.xxx.xxx) port 5000 (#0)
> POST /classifierService/api/v1/add_model HTTP/1.1
> Host: 52.xxx.xxx.xxx:5000
> User-Agent: curl/7.57.0
> Accept: */*
> Content-Length: 18436586
> Content-Type: multipart/form-data; boundary=------------------------65717bbb45c3da52
> Expect: 100-continue
>
* Done waiting for 100-continue
* Empty reply from server
* Connection #0 to host 52.xxx.xxx.xxx left intact
curl: (52) Empty reply from server
Any ideas what might be wrong, or how I can debug this problem?
There are many reasons that can cause this. The most obvious of which is the environment you setup on the server. Many (if not all) web frameworks set max upload limits to prevent DoS attacks and other similar exploits.
PHP (for example) sets the limit at 10mb I believe. You'll need to modify the appropriate php.ini adjusting parameters like the following:
... or you might be able to modify the values in a .htaccess file:
Ultimately, we need more information about the environment to give a more specific answer.