Skip to content

Fixed Lack of Memory when failing a job with wrong variable passed on the method fail()#45291

Merged
taylorotwell merged 5 commits into
laravel:9.xfrom
Fairydx:9.x
Dec 14, 2022
Merged

Fixed Lack of Memory when failing a job with wrong variable passed on the method fail()#45291
taylorotwell merged 5 commits into
laravel:9.xfrom
Fairydx:9.x

Conversation

@Fairydx

@Fairydx Fairydx commented Dec 13, 2022

Copy link
Copy Markdown
Contributor

Added validation to ensure that the $exception is a Throwable instance or is null, because if we pass another type of variable in the fail() method, the fail method enters an infinite loop until the php process crashes due to lack of memory

Fairydx and others added 5 commits December 11, 2022 15:31
If the batch has more than 1000 errors the function Bus::findBatch() fails because the database cuts down the words when reach is limit and then the seventh argument returns null because can't be json decoded.
Added validation to ensure that the $exception is a Throwable instance or is null, because if we pass another type of variable in the fail() method, the fail method enters an infinite loop until the php process crashes due to lack of memory
@taylorotwell
taylorotwell merged commit 7469819 into laravel:9.x Dec 14, 2022
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.

2 participants