Uploading a large file to the DB

Uploading a large file to the DB

by Alexander De La Garza -
Number of replies: 5

Good day,

I need help uploading a large file (75 MB) to the DB

Currently using 3.11.4+ version of Moodle, and the file is a CSV file

Opening the Moodle DB > Gear icon > import entries > select the file > click "upload" > *gets "stuck here* shows the header "upload entries from file" and where it normally displays the IDS of each entry is just blank

On the server side the php.ini and the .htaccess files are set to 

   php_value post_max_size 2048M
   php_value upload_max_filesize 1024M


In Moodle, in the course, course format is set to "single activity > DB" ... the files & upload drop down is set to "site limit (1GB)"


This is what I have gathered to check from my previous experiences, I wanted to ask if there is something else I should be looking at?

Is this a My computer issue? a Moodle Issue? or something I should check with my server host


Average of ratings: -
In reply to Alexander De La Garza

Re: Uploading a large file to the DB

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Switch on Debugging. Check for additional messages and also check the web server error log. We're hoping for a clue.
In reply to Alexander De La Garza

Re: Uploading a large file to the DB

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Alexander

Please can you explain what precisely you are uploading the file to (e.g. what does this refer to? Moodle DB > Gear icon > import entries > select the file)
In reply to Paul Holden

Re: Uploading a large file to the DB

by Alexander De La Garza -
thats the steps I take to upload the file ... and where it gets stuck is when I press the upload button ... on other DB's it starts to show the ID's that get assigned to each row of data

im uploading a coma separated file


header1 | header2 | header3 |
----------------------------------------------------------------------------
tbl r1c1 | tbl r1c2 | tbl r1c3 |
tbl r2c1 | tbl r2c2 | tbl r2c3 |
In reply to Alexander De La Garza

Re: Uploading a large file to the DB

by Alexander De La Garza -
Well, I ended up breaking the large file into sub files of 100k rows each ~10 MB each and just uploading them one at a time ...
In reply to Alexander De La Garza

Re: Uploading a large file to the DB

by Ken Task -
Picture of Particularly helpful Moodlers

These 2 PHP settings + if running Apache, a variable there also - LimitRequestBody

php_value post_max_size 2048M

php_value upload_max_filesize 1024M

Both of above should be same ... highest value + a little overhead.

'SoS', Ken