Why does the upload progress bar reset at 40% when uploading large files? I'm uploading a 5 GB file and the upload progress bar resets at 40%.
When it gets to 40% it starts counting again from 0%.
Eventually the file does upload completely but this is not good UX.
I was wondering if any knows how I can make the progress bar reach 100% like it should.
EDIT:
Here are some configuration settings requested in the comments:
post_max_size = 6G
upload_max_filesize = 6G
default_socket_timeout = 60
max_execution_time = 7200
max_input_time = 7200

This doesn't happen for smaller sized files.
When uploading the 5G file, the file upload does end. It doesn't get to 40% again after it resets to 0. It seems to get stuck at 19%.
All this time the file is being correctly uploaded to the temporary directory like it should. Like when the bar reaches 40% the file will continue to upload the temp file until it reaches the full 5G.
I was able to fix the Upload Progress so that it didn't stop at 40% (2 GB).
This is a temporary fix:
I uncommented the ondrej repo in the sources list (/etc/apt). This gave me access to uploadprogress 1.1.3-3 which has a couple of patches that the PECL repo doesn't have.
Then I got the source code:
apt source php7.3-uploadprogress

cd php-uploadprogress-1.1.3

And changed:
int read_bytes;

to:
unsigned long int read_bytes;

and recompiled from the source:
phpize; ./configure; make; make test; sudo make install; sudo service apache2 reload

It seems like the references to int were all changed except the reference to read_bytes. The maximum value of an int is 2GB.