Curl stops parsing and exits with error ‘curl (63) maximum file size exceeded download’ if the content-length of the file that we are trying to download is larger than the -max-filesize.
Here at Bobcares, we have seen several such curl related issues as part of our Server Management Services for web hosts and online service providers.
Today we’ll take a look at the cause for this error and how to fix it.
Why curl (63) maximum file size exceeded download occurs
Curl is the command that works without any user interaction. It is mainly used to transfer data from or to servers.
-max-filesize option specify the maximum size (in bytes) of a file to download. Generally, curl parses the server headers and finds the Content-Length. Also, it will compare content-length with the –max-filesize option and if the content-length of a file is larger, it stops parsing and exits with curl: (63) Maximum file size exceeded.
Here are the causes for this error to occur,
1. If the Upload/download limits are exceeded in the destination server
2. If the file is downloaded incorrectly that did not match the expected checksum in the metadata file.
For instance, the error appears as below.
NOTE: The file size is not always known prior to download, and for such files, this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
How we fix curl (63) maximum file size exceeded download
Now let’s get into the solution part of this error. Here are the steps that our Support Engineers provide to our customers to get rid of this error.
1. First, verify the upload limits on the destination server. The main involved directives are:
post_max_size
upload_max_filesize
max_file_uploads
max_input_time
For that, we suggest inspecting them with phpinfo() or ini_get() and change them the usual way.
2. Also, increasing the -max-filesize value while using curl command will fix this error.
[Need any further assistance in fixing curl errors? – We’re available 24*7]
Conclusion
In short, this error occurs if the content-length of the file that we are trying to download is larger than the -max-filesize. Today, we saw how our Support Engineers assist our customers In fixing this error.
0 Comments