You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found when multiple CommandTask's are due at the same time it can hit your PHP memory limit. I'm not sure what the best way to combat this is. Maybe running tasks in another process somehow?
There are two workarounds I have found:
Wrap the commands in a process:
# instead of
- task: my:command# use
- task: 'bash:bin/console my:command'
This works but removes the ability to catch exceptions (task will still fail if an exception in the command is thrown).
Also, your environment isn't passed to the command automatically like when running an actual CommandTask. You would need to pass it as an argument:
- task: 'bash:bin/console my:command --env=prod'
Ensure CommandTask's do not run at the same time. Even one minute difference in frequency solves the issue. The cron hash expressions can help with this. If using a CompoundTask to ensure tasks run in a specific order this gets more complex, you need split up the CompoundTask and schedule the tasks after each other giving enough time for the previous to complete.
The text was updated successfully, but these errors were encountered:
I have found when multiple
CommandTask
's are due at the same time it can hit your PHP memory limit. I'm not sure what the best way to combat this is. Maybe running tasks in another process somehow?There are two workarounds I have found:
Wrap the commands in a process:
This works but removes the ability to catch exceptions (task will still fail if an exception in the command is thrown).
Also, your environment isn't passed to the command automatically like when running an actual
CommandTask
. You would need to pass it as an argument:Ensure
CommandTask
's do not run at the same time. Even one minute difference in frequency solves the issue. The cron hash expressions can help with this. If using aCompoundTask
to ensure tasks run in a specific order this gets more complex, you need split up theCompoundTask
and schedule the tasks after each other giving enough time for the previous to complete.The text was updated successfully, but these errors were encountered: