9

I am having a very common problem which it seems that all the available solutions found are not working.

We have a LAMP server which is receiving high amount of traffic. Using this server, we perform a regular file submission upload. On small file uploads, it works perfectly. On files of around 4-5MB, this submission upload failed intermittently (sometimes it works but many times it failed).

We have the following configuration on our PHP:

max_input_time: 600
max_execution_time: 600
max_upload_size: 10M
post_max_size: 10M

Apache setting:

Timeout: 600
Keep-Alive Timeout: 15
Keep-Alive: On
Per Child: 1000
Max Conn: 100

Thus, I wonder if anyone can help me with this. We have found the issues and solutions online but none of them work in our case.

Thank you so much. Any input / feedback is much appreciated!

3
  • 1
    the $_FILES array should tell you the error. Commented Sep 27, 2011 at 19:01
  • 3
    @Dagon Unfortunately, we cannot even get to produce $_FILES because in the middle of the upload, the connection reset error is shown. Commented Sep 27, 2011 at 19:10
  • if your are using php-fpm then change upload_max_filesize = 10M( NOT max_upload_size: 10M) inside /etc/php5/fpm/php.ini (NOT /etc/php5/cli/php.ini).also if your are running nginx add client_max_body_size 200M; inside http section of /etc/nginx/nginx.conf Commented Oct 24, 2016 at 22:16

1 Answer 1

6

The connection coud be terminating at several places:

  1. Apache
  2. Post size limit inside of php.ini
  3. Memory limit inside of php.ini
  4. Input time limit inside of php.ini
  5. Execution time limit inside of php.ini or set_time_limit()

I would increase all of these, and see if it still persists. But you will have to bounce apache for the changes inside of php.ini to take affect.

These are also affected by what kind of connection speed the end user has, if it is failing for certain users, it's because their connection is slower than others, and their connection with the server is terminating.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.