Skip to content

[13.x] Add memory usage to WorkerStopping#60613

Draft
jackbayliss wants to merge 4 commits into
laravel:13.xfrom
jackbayliss:memory-usage-to-worker-stopping
Draft

[13.x] Add memory usage to WorkerStopping#60613
jackbayliss wants to merge 4 commits into
laravel:13.xfrom
jackbayliss:memory-usage-to-worker-stopping

Conversation

@jackbayliss

@jackbayliss jackbayliss commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

This PR adds $memoryUsage (in MB) to the WorkerStopping event so you can see the actual usage at the point the worker decided to stop, which is helpful for --memory adjustments, and observability. I've also put the logic into a method cos it was getting duplicated

This is useful as you can see your workers restart and the WorkerStopReason tells you it's memory related, but you don't actually know what the memory usage was.

Cloud does give cool metrics, but they give you clusters level metrics.

I have a bunch of cool ideas, that include drilling down into individual Worker metrics which this PR helps either way and reveals it for us to log and see :)

Thanks! Any feedback let me know.

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

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

Successfully merging this pull request may close these issues.

1 participant