I am using a form to upload files.

I have a situation where everything works, including the database action etc required, however depending on the size of the files I upload, I can either get the "completed" message, or I get a 500-internal-error.

Remember, everything works, it always does everything it should - it is just sometimes I get the 500 error.

If I upload one file anything over 8mb triggers the 500 error.
If I am uploading 2 at same time, it triggers if the total size of both files is over about 5mb.

I have set max execution limit, memory limit, max-upload size, max-post size -
you name it!

The script also uses a video encoding API to send and receive a file via FTP - receiving the final, encoded file.

Any ideas?