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

shopware-cli doesn't kill subprocesses when stopping #389

Closed
pkramme opened this issue Jul 18, 2024 · 1 comment
Closed

shopware-cli doesn't kill subprocesses when stopping #389

pkramme opened this issue Jul 18, 2024 · 1 comment

Comments

@pkramme
Copy link
Contributor

pkramme commented Jul 18, 2024

PHP Version

8.0-8.3

Shopware Version

6.4-6.6

Plugin Version

0.4.48

Actual behaviour

When shopware-cli stops expectedly or unexpectedly, subprocesses are orphaned and are continuing to run. This can create situations, where many more worker run than configured.

hubble_+  652966  0.1  0.1 1251256 21120 ?       Sl   13:22   0:00  \_ /usr/bin/shopware-cli project worker 3 --memory-limit=2G
hubble_+  652979 11.1  0.6 176224 109932 ?       S    13:22   0:00      \_ php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652980  7.5  0.6 174176 109904 ?       S    13:22   0:00      \_ php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652981 11.5  0.6 163936 99740 ?        S    13:22   0:00      \_ php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652951  6.2  0.6 178272 114064 ?       S    13:22   0:00 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652950  8.8  0.6 174176 110304 ?       S    13:22   0:01 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652923 13.9  0.7 188512 124780 ?       S    13:21   0:02 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652921  8.2  0.7 180320 116436 ?       S    13:21   0:01 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652866 10.0  0.7 190560 126968 ?       S    13:21   0:03 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652865 10.6  0.7 194656 129972 ?       S    13:21   0:04 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652748  6.1  0.8 199268 133976 ?       S    13:21   0:04 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652704  7.6  0.8 208992 145092 ?       S    13:21   0:05 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652701  5.6  0.7 184416 120748 ?       S    13:21   0:04 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652650  8.6  0.7 192608 128236 ?       S    13:20   0:07 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652649  7.0  0.8 209508 145324 ?       S    13:20   0:06 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652609  8.3  0.8 207460 143680 ?       S    13:20   0:07 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652567  7.5  0.8 206944 143228 ?       S    13:20   0:07 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652471  7.1  0.8 198752 134208 ?       S    13:20   0:07 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed
hubble_+  652417  7.4  0.8 209508 144516 ?       R    13:20   0:09 php bin/console messenger:consume --memory-limit=2G --time-limit=120 async failed

Expected behaviour

shopware-cli should make an effort to kill subprocesses and wait for them to actually stop before quitting itself.

Steps to Reproduce?

/usr/bin/shopware-cli project worker 3 --memory-limit=2G
# kill shopware-cli
ps auxf | grep messenger
# see still running subprocesses, now orphaned
@pkramme
Copy link
Contributor Author

pkramme commented Aug 2, 2024

fix in #394

@shyim shyim closed this as completed Aug 2, 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

No branches or pull requests

2 participants