TimWolla / docker-adminer

Database management in a single PHP file
https://hub.docker.com/_/adminer/
157 stars 69 forks source link

Increase allowed memory #145

Closed Creeperface01 closed 1 year ago

Creeperface01 commented 1 year ago

I'm getting Allowed memory size of 1073741824 bytes exhausted error when importing larger dumps and could not find a way to increase allowed limit. Would be nice to provide it as an option.

TimWolla commented 1 year ago

Under what circumstances are you seeing that error?

Creeperface01 commented 1 year ago

Under what circumstances are you seeing that error?

Happens when importing larger dumps (around 50-70 MB) Sorry for not mentioning, updated the description.

Temporal solution I'm using is to modify the limit inside of container directly

Miras4207 commented 1 year ago

You can load your local PHP configuration using docker-compose.yml like this:

services:
    adminer:
        image: adminer:4.8.1
        ports:
            - 8080:8080
        volumes:
            - ./php.local.ini:/etc/php/7.4/cli/conf.d/php.local.ini

php.local.ini

post_max_size = 516M
upload_max_filesize = 516M

If the PHP version changes in future versions of adminer image, you can find the correct path by running php --ini inside the container.

TimWolla commented 1 year ago

Sorry for not getting back to you earlier. I'd rather not increase the limits further, see the last paragraph in this comment:

https://github.com/TimWolla/docker-adminer/issues/36#issuecomment-399584096