Error happens after the whole file is uploaded (we lifted the post-size and file upload limits).
Solution that helped me:
nano /etc/apache2/mods-available/fcgid.conf
add this: FcgidMaxRequestLen 1073741824
or edit MaxRequestLen to a higher value.
Then restart:
service apache2 restart