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

Add a --time-limit option for event-store:projection:run command #66

Open
ambroisemaupate opened this issue Oct 16, 2019 · 0 comments
Open

Comments

@ambroisemaupate
Copy link

In production, bin/console event-store:projection:run command may be executed during a long time, we should be able to kill it after a given time in the same way Symfony Messenger consumers do to avoid PHP memory leaks. Then, using a process manager such as Supervisor to restart automatically worker

[program:eventstore-projection]
command=php /app/bin/console event-store:projection:run %(PROJECTION_NAME)s --time-limit=1800
autostart=true
autorestart=true
process_name=%(program_name)s_%(process_num)02d
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true

[supervisord]
nodaemon=true

https://github.com/symfony/messenger/blob/master/Command/ConsumeMessagesCommand.php#L79

https://github.com/symfony/messenger/blob/master/Worker/StopWhenTimeLimitIsReachedWorker.php

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

No branches or pull requests

1 participant