By chhaaks
Im Setting up a Laravel on App Platform. I use horizon (with redis) for the Queue. And two dedicated Worker ( from App Platform) to run horizon and the scheduler. Everything is running and working as expected. The only issue that i have is that i dont find a way to change memory_limit for my php worker. The worker is using the same repo and ignores the user.ini in public folder which works for the Laravel App. My app is importing huge Data in long running Jobs. I already Chunked the jobs but im every time running in timeouts or memory issues. Someone went trough this already or can give me hints how to adjust the memory_limit and other php settings?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @chhaaks,
I’ll strongly urge you to check the following question asked in the community:
https://www.digitalocean.com/community/questions/php-memory-limit-digitalocean-apps
To summarize it, you’ll need to put your .user.ini in your public folder with your other .PHP files and it should work as expected.
Hi @KFSys,
thanks for your answer. The worker itself is currently setup using 2G of memory. Unfortunately the php-memory limit is still at 128mb. How can i change these variables ? (memory_limit / max_execution_time / etc.)
Thanks :)
Hi @chhaaks,
I’ll recommend going over the documentation, it can be really helpful.
https://docs.digitalocean.com/products/app-platform/how-to/manage-workers/
Go to https://cloud.digitalocean.com/apps, click on your app, and click on the Settings tab. Click the Worker you’d like to edit.
You can use the configuration settings you see here to change the Worker’s scaling behavior, modify environment variables, edit commands, and more.
Scaling is the process of adding more capacity to a component in your app. There are two kinds of scaling in App Platform:
Horizontal scaling adds more containers, which will be load-balanced.
Vertical scaling increases the amount of CPU and memory allocated to each container instance.
You can control how each component in an app scales. This configuration is available both in the app spec and in the control panel.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.