Skip to content

pm.max_requests should be set #2142

Description

@m-breitbach

According to the official Nextcloud server tuning guide, PHP-FPM should be configured with pm.max_requests set, to prevent memory leaks.

I am in a situation where workers consume increasing amounts of memory. I suspect this is to my configuration of the preview generation (enabled HEIC, PDF). I assume it is normal behavior, that workers do not actively free their allocated memory. pm.max_requests solves the problem by limiting worker lifespan.

I suggest to make the value configurable with some reasonable default (e.g., 500).

Activity

  1. m-breitbach commented on Sep 5, 2026

    @m-breitbach
    ContributorAuthor

    @theCalcaholic, if you think it makes sense, I can create a PR. Waiting for your confirmation though.

  2. theCalcaholic commented on Sep 6, 2026

    @theCalcaholic
    Collaborator

    Thank you, yes, makes total sense. I'll happily merge a PR or can do it myself. Whatever you prefer :)
    However, this would require not just a change to the template (etc/ncp-templates/php/pool.d.www.conf.sh) itself, but also a script for regenerating it on update (so in updates/<version>.sh - compare 1.58.0.sh).

  3. pinned and unpinned a comment on Sep 6, 2026
  4. m-breitbach commented on Sep 6, 2026

    @m-breitbach
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions