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

Infinite loading on Batches list #1259

Closed
LonnyX opened this issue Mar 20, 2023 · 5 comments
Closed

Infinite loading on Batches list #1259

LonnyX opened this issue Mar 20, 2023 · 5 comments
Labels

Comments

@LonnyX
Copy link

LonnyX commented Mar 20, 2023

  • Horizon Version: 5.15.0
  • Laravel Version: 10.3.3
  • PHP Version: 8.1
  • Redis Driver & Version: predis/phpredis 2.0.2
  • Database Driver & Version: PostgreSQL 14

Description:

I'm experiencing an issue with Laravel Horizon where the Batches list has an infinite loading spinner (with 404 Not found status on console). The rest of the application seems to be working fine, but I can't access the Batches list to manage my batch jobs.

To resolve this issue, I've had to manually cleanup the _jobs_batches table in my Postgresql 14 database. After doing so, the Batches list is accessible again. But once some batches are dispatched, it happen again

There is nothing on the logs

Steps To Reproduce:

Not sure why or how this happen

image

image

@driesvints
Copy link
Member

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!

@LonnyX
Copy link
Author

LonnyX commented Mar 21, 2023

Hi @driesvints

After investigating the issue myself, it seems that the problem arises from the use of the "SerializesModels" trait in the Job class. Specifically, if the serialized model no longer exists, it causes the batch list on Horizon to break.
In my opinion, this constitutes a bug on Horizon.

However, you can close the issue if you think it's appropriate.

@driesvints
Copy link
Member

Hi @LonnyX, thanks for that. I'll reopen this but would appreciate community help to get this fixed.

@github-actions
Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

LonnyX added a commit to LonnyX/framework that referenced this issue Mar 21, 2023
As described on this issue: laravel/horizon#1259

If a model is deleted while it still exists on the batches list (serialized), it will cause the batches list to be broken.

The reason for this is that when the unserialize function is called, it tries to invoke the __unserialize() or __wakeup() methods automatically, and if the model does not exist, an exception is thrown.
LonnyX added a commit to LonnyX/framework that referenced this issue Mar 21, 2023
As described on this issue: laravel/horizon#1259

If a model is deleted while it still exists on the batches list (serialized), it will cause the batches list to be broken.

The reason for this is that when the unserialize function is called, it tries to invoke the __unserialize() or __wakeup() methods automatically, and if the model does not exist, an exception is thrown.
taylorotwell pushed a commit to laravel/framework that referenced this issue Mar 21, 2023
As described on this issue: laravel/horizon#1259

If a model is deleted while it still exists on the batches list (serialized), it will cause the batches list to be broken.

The reason for this is that when the unserialize function is called, it tries to invoke the __unserialize() or __wakeup() methods automatically, and if the model does not exist, an exception is thrown.
taylorotwell pushed a commit to illuminate/bus that referenced this issue Mar 21, 2023
As described on this issue: laravel/horizon#1259

If a model is deleted while it still exists on the batches list (serialized), it will cause the batches list to be broken.

The reason for this is that when the unserialize function is called, it tries to invoke the __unserialize() or __wakeup() methods automatically, and if the model does not exist, an exception is thrown.
@driesvints
Copy link
Member

Thanks for sending in a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants