Skip to content

Add environment var to set apc.shm_size php config #2462

Description

@LeSnake04

When I got the warning that the apc.shm_size is almost full It took me a long time to figure out how to cleanly fix it in docker and where the config PHP is stored.

It feels a bit odd to me that a setting that the docs recommend to change requires me to figure out where the PHP config dir is and add a file to it.

I would suggest adding a PHP_APC_SHM_SIZE environment variable similar to PHP_UPLOAD_LIMIT.

Activity

  1. changed the title [-]Add enviroment var to set `apc.shm_size`[/-] [+]Add environment var to set `apc.shm_size` php config[/+] on Aug 28, 2025
  2. saschabrockel commented on Nov 22, 2025

    @saschabrockel

    Agreed. I have no idea where the correct php.ini is.

  3. cpunk commented on Dec 14, 2025

    @cpunk

    When I got the warning that the apc.shm_size is almost full It took me a long time to figure out how to cleanly fix it in docker and where the config PHP is stored.

    And which file was the right one to edit this option?

  4. cpunk commented on Dec 18, 2025

    @cpunk

    And which file was the right one to edit this option?

    I added the line
    apc.shm_size=128M
    to the file
    /etc/php/8.2/cli/conf.d/20-apcu.ini
    did a
    systemctl restart php8.2-fpm.service
    and the warning disappeared. It would have been really nice if there had been a note about this somewhere.

  5. oxivanisher commented on Jul 24, 2026

    @oxivanisher

    I get this warning now too. This would be really nice if its configurable as a environment variable.

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