Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entrypoint: enable configuring PHP memory limit #374

Closed
wants to merge 2 commits into from

Conversation

Maffsie
Copy link

@Maffsie Maffsie commented Aug 28, 2023

Adds an environment variable, PHP_MEMORY_LIMIT, which overrides the default memory limit as shipped by PHP.

This environment variable, if specified, should be in the format normally expected by PHP (such as 256M or 1G). If unspecified, it defaults to the memory limit specified in php.ini at time of writing, which is 128M. If desired, a more specific default value can be chosen.

Supercedes #125
Supercedes #166
Closes #124

Adds an environment variable, PHP_MEMORY_LIMIT, which overrides the default memory limit as shipped by PHP.

Closes wallabag#124
Copy link
Member

@j0k3r j0k3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, could you update the README so people will know how to use it?

@j0k3r j0k3r requested a review from Kdecherf August 28, 2023 16:45
Updates the readme with documentation for the new PHP_MEMORY_LIMIT environment variable
@Maffsie
Copy link
Author

Maffsie commented Aug 31, 2023

@j0k3r Added documentation to the README; sorry I didn't notice it should be there!

@pparidans
Copy link

Hi, first off 👍 for this change (that actually would allow me to re-fetch some of my entries as they systematically blow the memory limit up).

Naive question but, any update on merging this PR ?

Copy link
Member

@Kdecherf Kdecherf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of sed-ing the php.ini file as there are other ways to override php configuration settings.

For example we could add a file 99-wallabag.ini in /etc/php81/conf.d/

/var/www/wallabag # echo memory_limit=256M > /etc/php81/conf.d/99-wallabag.ini
/var/www/wallabag # php -i | grep -i memory
Zend Memory Manager => enabled
memory_limit => 256M => 256M
Collecting memory statistics => No

@akosiaris
Copy link

Coming from #400 (thanks @j0k3r for pointing me here, I had missed this PR) where I followed a similar, albeit less developed approach, I wanna ask if I can help somehow push this forward. I see it's lingering for a few months now.

Kdecherf added a commit that referenced this pull request Mar 10, 2024
Supersedes #374

Fixes #124

Signed-off-by: Kevin Decherf <[email protected]>
@Kdecherf
Copy link
Member

Hello @Maffsie,

I've opened #403 which is based on envsubst and does not edit the base php.ini file

Kdecherf added a commit that referenced this pull request Mar 11, 2024
Supersedes #374

Fixes #124

Signed-off-by: Kevin Decherf <[email protected]>
@Kdecherf
Copy link
Member

Superseded by #403

@Kdecherf Kdecherf closed this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP Memory Limit
5 participants