Skip to content

PHP memory limit to 128 ? #447

Closed
Closed

Description

@bitdegree67

Hello, i'm using the latest image (with nextcloud 14)
and when i run any php occ command. i get this message
The current PHP memory limit is below the recommended value of 512MB.
i haven't touch the image. it's the official image from docker hub vanilla (with clean installation to mariadb)

Activity

  1. bitdegree67 commented on Sep 8, 2018

    @bitdegree67
    Author

    It's a good idea to PR this ?
    RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
    in Dockerfile of NC14 ?

  2. J0WI commented on Sep 9, 2018

    @J0WI
    Collaborator

    This is already set in .htaccess and .user.ini. Have you modified them?
    You can also mount a custom config into /usr/local/etc/php.

  3. xXZaretXx commented on Sep 10, 2018

    @xXZaretXx

    Hello,
    i have the same problem ,
    the php limit is to 128 (php -i | grep memory_limit)
    the values in .htacess and user.ini are set to 512

  4. bitdegree67 commented on Sep 10, 2018

    @bitdegree67
    Author

    @J0WI No, as i said. i've just run
    docker run nextcloud
    and then in this new nextcloud run "php occ" then i get the message of warning 128MB

  5. xXZaretXx commented on Sep 10, 2018

    @xXZaretXx

    @bitdegree67
    You can change it with
    echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
    inside the docker container
    but i think its temporary and hacky

  6. bitdegree67 commented on Sep 10, 2018

    @bitdegree67
    Author

    @xXZaretXx I myself proposed this solution

  7. xXZaretXx commented on Sep 10, 2018

    @xXZaretXx

    @bitdegree67 ups yes you are right , i'm blind

  8. trytrytogo commented on Sep 10, 2018

    @trytrytogo

    Hello,
    i have the same problem ,someone who can slove it. thanks.

  9. J0WI commented on Sep 10, 2018

    @J0WI
    Collaborator

    Thanks for providing the details. I can now reproduce the issue.
    @tilosp since this has been added in nextcloud/server#10539 (NC 14), should we change the defaults for the container?

  10. bitdegree67 commented on Sep 11, 2018

    @bitdegree67
    Author

    The question is why .htaccess isn't used by "php occ"

  11. J0WI commented on Sep 11, 2018

    @J0WI
    Collaborator

    Because it's the cli and not apache

  12. bitdegree67 commented on Sep 11, 2018

    @bitdegree67
    Author

    Alright! so it's dsn't a problem for nextcloud, only for occ

  13. cynecx commented on Sep 12, 2018

    @cynecx

    @bitdegree67 It is apparently still an issue with the php-fpm variant. My current solution is to have my own derived Dockerfile which simply increases the mem limit, but I think this should really be included in upstream (php-fpm and the alpine alt).

    Edit: I've just realized that the memory-limit configuration is also present in .user.ini, but somehow nextcloud was still complaining.

  14. added 2 commits that reference this issue on Sep 12, 2018
    6815c7b
    f5d27c6
  15. J0WI commented on Sep 12, 2018

    @J0WI
    Collaborator

    There are two different checks in NextCloud:

    • One is in the setting page, served through Apache or PHP-FPM and using .htaccess or .user.ini
    • Another one is in the occ cli util (since NextCloud 14), which uses PHP defaults

    You can always mount a custom my-config.ini file, that contains e.g. memory_limit = 512M, into /usr/local/etc/php/conf.d/.
    I've created #460 to ship this setting by default.

  16. added a commit that references this issue on Sep 12, 2018
    69e982d
  17. added a commit that references this issue on Nov 10, 2018
  18. added a commit that references this issue on Dec 13, 2018
  19. aibmakesense commented on Mar 9, 2019

    @aibmakesense

    pora

    Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions