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

Cron container runs out of memory #347

Open
MagicLegend opened this issue May 3, 2022 · 0 comments
Open

Cron container runs out of memory #347

MagicLegend opened this issue May 3, 2022 · 0 comments

Comments

@MagicLegend
Copy link

Preconditions

  1. Use --with-cron to generate configs
  2. I'm gonna assume a default Magento won't have this issue, but our installation has about 30 packages in the composer.json, so not a big store imo.

Steps to reproduce

  1. Start the containers
  2. Start the cron (make sure it's enabled in env.php - otherwise you'll be searching like me why it's not working since it's not mentioned in the docs...)
  3. Observe the log file

Expected result

  1. Happy cron jobs

Actual result

  1. Sad cron jobs

image

What can be investigated is why the cron job thinks it only has 2MB of memory, when PHP was configured for 2GB.

Solution

  1. Allocate more memory to the cron by changing the CRONTAB environment to:
CRONTAB: '* * * * * root cd /app && /usr/local/bin/php -d memory_limit=-1 bin/magento cron:run >> /app/var/log/cron.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant