I have the line `$input = fopen( 'php://input', 'r' );` in my code for uploads.

When the file is done uploading, I check against `$_SERVER['CONTENT_LENGTH']` to see everything was sent as expected. Recently the `CONTENT_LENGTH` and the size of my upload file started to not match randomly ( About once every 20 minutes with people uploading very frequently ).

I logged and saved the mismatches and found that some files were unable to be opened, while some downloaded and were cut off. One I opened in Photoshop even warned that the document was damaged.

Is there any server config I should be looking for that may have been changed?

I tried replicating by shutting browser tabs and things of that nature but still would not replicate the error.

We are uploading via an AJAX POST. The `POST` body is the upload source.