Can't import 130mb database

Hello guys.
Today i’m first time using this awesome development tool.
I have little probelm when import database.
My database size is 130mb.

I got this error message.

Fatal error

: Allowed memory size of 134217728 bytes exhausted (tried to allocate 138225832 bytes) in
/var/www/html/adminer.php
on line
95

Hi @ulziibat.n :wave: Welcome to the community!

It does indeed sound as if the memory limit isn’t able to handle the database import of that size, I’m going to discuss this with our development team further and will update you as soon as I can. As a workaround you may wish to try uploading it via command line instead:

docker exec -i devkinsta_db mysql -u root -p [DB name] < [path/to/sql/file]

That should avoid any PHP limitations that are in place :crossed_fingers: Let us know how it goes!

Hi Melissa.

Just here to add that I had the same error. Our database is 168mb.

Hi @jasmink . Welcome to DevKinsta and apologies for the trouble. Does the above workaround work for you?

Hey Michael. No problem. It didn’t, but there’s a good chance it’s because of user error - it’s been a while since I used terminal. I’ll post an update if I get around to trying again however I might just revert to SFTP for now.

DevKinsta has a default limitation on 128MB file upload.
In order to get that increased you will need to access shell.

It can be done by running
docker exec -it devkinsta_fpm bash

This will bring you to the terminal of the application server.
Depending on version of PHP you are using, file is located in
/etc/php/7.4/fpm/conf.d/tuning.ini
This is for version 7.4. If you need to edit file for different version you can simply change 7.4 in path with PHP version used.

3 values should be changed:
upload_max_size = 128M
post_max_size = 128M
upload_max_filesize = 128M

You can put 256M for all 3, restart DevKinsta, and you are done.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.