I am trying to import a very big CSV file into my Drupal 7 site using the Feeds module, but I get the following error:
Warming: POST Content-Length of 40245470 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
How can I fix this?
8388608 bytes is 8MB, not 8GB. 40245470 bytes is < 40MB.
Your PHP settings are limiting the maximum POST content length to 8MB, which is why you're getting the error.
To fix, edit your php.ini file and add/update these lines:
post_max_size=50M
upload_max_filesize=50M
Not many things could handle this. For importing massive amounts of information from an external database, you are better off to do it using Feeds and Feeds Database. Even then you will probably be best to do it progressively in chunks.
If you are intent on using csv files, then export them from your original database using limited queries and create several files:
SELECT ......... LIMIT 100 OFFSET 0;
SELECT ......... LIMIT 100 OFFSET 100;
and so on until you have all the information.