0
Under review

500 Internal Server Error on large uploads

maxloo2 1 month ago updated by webmaster 1 week ago 10

I was trying to upload decently large MOV files (8GB ~ 20GB) and I keeps on getting this 500 Internet Server Error, this is the only error messages shown besides ocassionally "no messages from the server" or something like that, also nothing in the error logs too. I have observed that it often get stuck at around 50% no matter of the size of the upload, but it can also just be anotther coincidence. I have configured upload_max_filesize & post_max_size to 50G and the timeouts to 999999. My filerun is installed in a proxmox LXC, internal ssd for upload scratch disk and external ZFS hdd array for actual file storage.

I have also already been using "display_errors: on" but I am still only getting 500 Internal Server Error.

2 weeks later, the problem persists. I really need to get this working as soon as possible and yet I have not the slightest idea why this is happening.

Under review

Please check the Nginx logs, to find the entries related to the posted problem. 500 is just a generic one, not indicating any reason of failure.

PHP log entries might also help troubleshooting.



as I have already mentioned in the original post, I couldnt find anything in the error logs, that is also the reason why I submitted this support ticket in the first place. my nginx log is empty and my php logs doesnt not show any error.

for reference I checked /var/log/nginx/error.log and /var/log/php7.4-fpm.log

also my php configs here:

A lot of the configured values are absurdly large, probably erroring out. Please reset the values to the FileRun or PHP recommend ones, and if you do not know what the limits are, do not set invalid values.

some more information: my big uploads always get stuck around 50% progress, and will automatically retry for 3 times before showing the error prompt.

I am running haproxy pfsense as my reverse proxy, this is what I found in the logs, the SSL handshake failure starts to show up around the time my upload stops. (edit: upon further inspection I suspect it might not be related to the upload but I will leave it here anyway)


I have changed my max_execution_time to 0, and cut my upload_max_filesize and post_max_size in half. I will continue to test with different values.


EDIT: I tried uploading a smaller file (6GB), it went all the way to 90% until the upload progress restart itself,
Retry #1 stopped at around 50%, Retry #2 stopped at around 90%, Retry #3 temporarily stopped at around 50% before proceeding to throws the 500 Internal Server Error after reaching 90%. Again, no error is logged anywhere, the only thing I could find is SSL handshake failures.

the smaller the PHP settings value, the higher chance your large upload will succeed. Reset all is them to PHP default.


post_max_size and upload_max_filesize at 10M, cant even upload a 37MB file.

EDIT: it works after setting max_execute_time to 0, now testing large uploads...

EDIT 2: with large upload it goes all the way to 100% (waiting) and proceed to fail with this "missing temporary file from a chunked upload" error.


I also got 504 gateway timeout on another test.

EDIT 3: it now works, but unpredictably and randomly. also sometimes it will go very slow (~10MB/s) until I restart my LXC, not sure what could be the case. 

Upload from very small, to progressively larger files. When you hit the error, that's where you need to set the PHP settings, knowing that there is something else limiting that size, usually the configuration of the reverse proxy (sometimes firewalls are well)

Well, you will need to enable error logging on your HTTP server and also your reverse proxy server if you are using one. Then, with more information we might be able to help. As you can understand, with no information, we cannot guess what the problem is.

Perhaps fastcgi execution limits within nginx?

had an issue just like this on IIS