File upload results with connection reset

0

I am experiencing an issue on an EC2 instance. When trying to upload a file I get different behaviours :

  • file size about 1.5mb : file is correctly sent to the server and processed by the backend
  • file size about 2mb : 408 Timeout
  • file size larger than 2mb : upload freezes at about 23 seconds and I get a ERR:CONNECTION_RESET message in the console

Stack :

  • EC2 instance (not using any ELB)
  • Docker with the following :

    • httpd (2.4+)
    • proxy php-fpm (php7+)
    • mysql
    • redis (not in use yet)

I have tried the following :

  • Increased TimeOut to 120, KeepAlive On and increased KeepAliveTimeout to 120 in apache
  • Increased LimitRequestBody and LimitXMLRequestBody to 25000000
  • Added ProxySet connectiontimeout=120 timeout=120 in the Proxy directive in apache when calling the php-fpm proxy
  • Set pm.process_idle_timeout = 120s in the php-fpm conf file
  • Increased all possible Timeout and File Size parameters in the php.ini
  • Rebuilt more than a hundered times the docker stack and rebooted the instance countless times

And, of course, this works perfectly fine locally, but doesn't on the EC2 instance.

Thoughts anyone ? Thanks in advance

ness

Posted 2019-04-24T17:17:14.907

Reputation: 1

Answers

0

Finally solved it by adding the following line in apache :

RequestReadTimeout handshake=5 header=10 body=120

Which specifies timeouts at different statuses of the request

ness

Posted 2019-04-24T17:17:14.907

Reputation: 1