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

[Bug] Mass-PM takes too much memory #1450

Closed
fionera opened this issue Oct 3, 2020 · 2 comments · Fixed by #1451
Closed

[Bug] Mass-PM takes too much memory #1450

fionera opened this issue Oct 3, 2020 · 2 comments · Fixed by #1451
Assignees

Comments

@fionera
Copy link
Contributor

fionera commented Oct 3, 2020

Describe the bug
When you have a lot of Users, the Mass-PM feature requires a very high memory limit and times out.

To Reproduce
Steps to reproduce the behavior:

  1. Have 8000 users
  2. Send a Mass Message
  3. See error

Expected behavior
The messages should be send.

UNIT3D (please complete the following information):

  • UNIT3D Version: master
  • Laravel Version: -
  • PHP Version: 7.4
  • Database Driver & Version: -
  • Web Server Driver & Version: Nginx
  • OS Driver and Version: Ubuntu 20.04

Desktop (please complete the following information):

  • OS: -
  • Browser: -
  • Version: -

Additional context

Possible Fix?
The Messages should be send in the Background in batches and not as a single Call.

@HDVinnie
Copy link
Collaborator

HDVinnie commented Oct 7, 2020

@fionera im not able to replicate this. The mass pm function already loops through all users and dispatches a queued job.

        foreach ($users as $user) {
            $this->dispatch(new ProcessMassPM(self::SENDER_ID, $user->id, $subject, $message));
        }

It wouldn't send all 8000 at once unless using the sync queue driver. What do you suggest?

@HDVinnie
Copy link
Collaborator

HDVinnie commented Oct 7, 2020

@fionera be sure to test the latest PR. #1451

I am seeing no memory/timeout issues sending a mass pm to 18,500 users.

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

Successfully merging a pull request may close this issue.

2 participants