Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Campaign get stuck in the 'running' status #905

Closed
banagg opened this issue Aug 14, 2022 · 4 comments
Closed

Campaign get stuck in the 'running' status #905

banagg opened this issue Aug 14, 2022 · 4 comments
Labels
needs-investigation Potential bug. Needs investigation

Comments

@banagg
Copy link

banagg commented Aug 14, 2022

Version:

  • listmonk: [eg: v2.1.0, v2.2.0]
  • OS: [e.g. Ubuntu 18]

Description of the bug and steps to reproduce:
I have a daily mailer which initiates about 10-11 different campaigns so as to support multilingual content offered by my website. All the campaigns are initiated at about the same time everyday. Out of these 10-11 campaigns, only about 1-2 campaigns are delivered successfully in the very first attempt (at the same time when I initiate them), all of the other campaigns though get stuck either after sending a few mails or at 0, with the 'Progress' status bar showing that the process is working.

I tried to restart the app, and once every three-four restarts, 1-2 of the campaigns currently in the 'running' status change their status to 'finished', but all the others still remain in the 'running' state.

I was initially using 'v2.2.0', but after I found this bug there, I then downgraded to 'v2.1.0', after which the problem persisted, and the campaigns again failed to move to the 'finished' status. It has been about three hours now, (plus I have encountered this before and was able to send my older campaigns after multiple restarts), and the 'running' campaigns still show 'a few seconds', only when the campaign is finished is when it updates the message to something else like '1 hour' etc.

Is it possibly a settings issue? My current settings are -

  • Concurrency - 2
  • Message Rate - 7
  • Batch Size - 1000
  • Maximum Error Threshold - 500

Screenshots:
184541166-e7c80156-e778-4a4a-8f41-503328f77397

@banagg banagg added the bug Something isn't working label Aug 14, 2022
@knadh knadh added needs-investigation Potential bug. Needs investigation and removed bug Something isn't working labels Aug 17, 2022
@knadh
Copy link
Owner

knadh commented Aug 17, 2022

Hm, this is strange. I have run tests in the past with dozens of simultaneous campaigns without any issues. Will try to reproduce.

Is this happening only when you have a dozen concurrent campaigns? Can you start with say 2 at a time and see at what count this issue happens, that would be helpful.

PS: The settings look fine.

@banagg
Copy link
Author

banagg commented Aug 18, 2022

So here is an experiment I tried.

  1. At the moment I had about 20 campaigns stuck in the 'running' status.
  2. I paused all of them, and started a campaign whose target list only had about 12-14 users.
  3. The list was still stuck in the 'running' status.
  4. I restarted the listmonk instance, and now the above-mentioned campaign (the one with 12-14 users) did work successfully.
  5. I now, started two campaigns simultaneously. Where both the campaigns were again sent to lists which had less than 20 users. The campaigns did work and were delivered successfully.
  6. I then started one of the larger campaigns which is sent to about 20K users. The campaign was working well, and using a batch of 1000, I was able to send my email to about 3000 users, at which point I then started 3 more campaigns (all of the above-mentioned starts were not fresh, and were made by switching the status from 'paused' to 'running').
  7. This time around the campaigns got stuck, and all of the four current running campaigns got stuck in the 'running' state.
  8. Suspecting that there is a problem with the 'concurrency' setting. I then modified my 'concurrency' setting to 13 and 'message rate' to 1 so that the overall email/sec remains under my SES allowable limit of 14 emails/sec.
  9. I started the experiment by running 1 campaign and it worked, next up I increased the value to 4 simultaneous campaigns and it still worked. I then ran all of my dozen campaigns at the same time, and weirdly enough it worked again.
  10. As of now, after modifying the settings, as mentioned above, my requirement of sending a dozen campaigns a day works correctly. The problem is that the number of simultaneous campaigns I want to run may increase in future, and if my limit stays at 14/sec (defined by SES), then I would not be able to send multiple campaigns at the same time (possibly, as per the behaviour exhibited so far).

What do you make of this?

@knadh
Copy link
Owner

knadh commented Aug 19, 2022

Thanks for the detailed test. I'll try and recreate this behaviour at my end. Unable to comment on what the issue could be, right now.

@MaximilianKohler
Copy link
Contributor

@banagg How do you downgrade to a previous version?

knadh added a commit that referenced this issue Dec 22, 2023
- Sent count is no longer the batch size fetched from the DB but is
  the actual count of messages sent.
- Pausing and resuming now accurately tracks the last subscriber that
  was processed and resumes from there.
- Fix multiple concurrent campaigns blocking.

Closes #1616. Closes #905. Closes #1496. Closes #1250.
knadh added a commit that referenced this issue Dec 23, 2023
- Sent count is no longer the batch size fetched from the DB but is
  the actual count of messages sent.
- Pausing and resuming now accurately tracks the last subscriber that
  was processed and resumes from there.
- Fix multiple concurrent campaigns blocking.

Closes #1616. Closes #905. Closes #1496. Closes #1250. Closes #1010.
@knadh knadh closed this as completed in 772476c Jan 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
needs-investigation Potential bug. Needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants