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

Campaign is marked finished though email is not sent to all subscribers #1762

Open
jackraj97 opened this issue Mar 1, 2024 · 10 comments
Open
Labels
needs-investigation Potential bug. Needs investigation

Comments

@jackraj97
Copy link

Version:

  • listmonk: v3.0.0

Description of the bug and steps to reproduce:
Most of my campaigns are sent to very less users and it is marked finished. I'm also unable to resend the campaign.

  1. Can someone please help check why this happens?
  2. Shouldn't listmonk retry the failed subscribers (in case of errors) instead of simply marking the campaign as finished?
  3. Also, why is the campaign send button disabled, when the campaign is not fully sent?

I have attached the campaign list page, performance settings with this issue.
I'm using brevo SMTP on port 587 with LOGIN auth protocol.

Screenshots:
image
image

@MaximilianKohler
Copy link
Contributor

What do your logs show?

@jackraj97
Copy link
Author

Logs are always empty.

@knadh knadh added the needs-investigation Potential bug. Needs investigation label Mar 5, 2024
@knadh
Copy link
Owner

knadh commented Mar 14, 2024

listmonk retries e-mails N times as configured in SMTP settings. The lower count indicates that there were errors in sending (despite retries). However, the errors should definitely be logged. You should set an error threshold so that the campaigns are paused on errors and check the error log immediately. Changing settings restarts listmonk and wipes the logs.

@rjocoleman
Copy link

I'm seeing this too FWIW, my listmonk logs simply show EOF per subscriber and the SMTP server seems to know nothing about it. I'll try to reproduce it locally when I get a bit of time next week and see what's up

@knadh
Copy link
Owner

knadh commented Mar 15, 2024

Ah, EOF indicates a broken network connection with the SMTP.

@MaximilianKohler
Copy link
Contributor

MaximilianKohler commented Mar 25, 2024

Well my issue of getting lots of errors #1717 (comment) progressed to the campaign completing/failing with no errors. This was sent to 150k subscribers at 10x10 rate:

2024/03/25 09:00:03start processing campaign (Campaign name 2024-03-25 150k)
2024/03/25 09:00:05campaign (Campaign name 2024-03-25 150k) finished

Screenshot 2024-03-25 140950

A verbose log is essential in this situation, as I have no clue who was sent the email, so the only option I have is to send it again to everyone, and people don't like being spammed with the same email.

@MaximilianKohler
Copy link
Contributor

MaximilianKohler commented Mar 26, 2024

In case it's helpful, I found this open-source app that works like a verbose log, listing all the emails sent by SES:

SES Dashboard https://sesdashboard.com/ - https://github.com/Nikeev/sesdashboard

It would be greatly preferred to have that built into listmonk though.

Supposedly it can be done in Cloudwatch, but I haven't been able to figure out a way to get it to list the emails; it only lists the number of emails.

@MaximilianKohler
Copy link
Contributor

MaximilianKohler commented Mar 26, 2024

Well I figured out a way to kind of get the list of 49 people it was sent to. Please let me know if there's a better way of doing this.

#686 gave me the idea of searching the campaign_views table. So I checked the campaign ID of the failed campaign (525) and did:

psql -U listmonk -h localhost -p 5432 listmonk
\dt
SELECT * from campaign_views where campaign_id=525;

It outputs subscriber IDs, so to get the emails you may be able to modify this command: #1629 (comment)

Or maybe these commands can be modified to do something similar #1562 (comment)

But I'm not sure how exactly for either one.

It would be better to use a command that directly saves it to a file. This might work https://stackoverflow.com/questions/5331320/psql-save-results-of-command-to-a-file.

@stephdin
Copy link

stephdin commented Mar 27, 2024

Hey everyone, i ran into the same issue. Fortunately while testing my setup locally.

Version v3.0.0 (f9120d9 2024-02-04T11:20:27Z, linux/amd64)

I am running a test setup with Mailpit (https://mailpit.axllent.org/) as an SMTP server.
Performance configuration:
Concurrency: 1
Message rate: 1
Batch size: 1000
Maximum error threshold: 25
Sliding window limit: 300 Messages/hour

While testing there were no errors shown in the log. I think there is another bug with the sliding window limit, which might be related to this issue.

Steps to reproduce:

  1. Set a sliding window limit
  2. Start your sending your campaign
  3. Pause the campaign
  4. BUG: Log shows pipe.go:122: messages exceeded (300) for the window (1h0m0s since 27 Mar 24 15:30 +0000). Sleeping for 59m12s. even if the limit was not even reached
  5. Disable the limit -> listmonk restarts
  6. Unpause the campaign
  7. The campaign is immediately finished, in my case "Sent: 186 / 345 "

screenshot

If the sliding window limit is disabled on campaign start, i can pause and unpause the campaign without issues. In the logs i see start processing campaign and stop processing campaign. Notice the second line in the logs, this was the moment i paused the campaign, there was no "stop processing campaign" logged. At 15:32:20 i disabled the sliding window. There was a warning shown in the UI, that i should pause my campaigns. In the campaign overview it showed as paused, but maybe listmonk did not paused it internally?
Notice how at 15:32:46 the campaign jumped to finished in an instant.

Here are the logs:

listmonk_app  | 2024/03/27 15:31:15 manager.go:409: start processing campaign (Copy of Copy of Testkampagne)
listmonk_app  | 2024/03/27 15:31:38 pipe.go:122: messages exceeded (300) for the window (1h0m0s since 27 Mar 24 15:30 +0000). Sleeping for 59m12s.
listmonk_app  | 2024/03/27 15:32:20 init.go:843: reloading on signal ...
listmonk_app  | 2024/03/27 15:32:20 init.go:796: HTTP server shut down
listmonk_app  | 2024/03/27 15:32:21 main.go:102: v3.0.0 (f9120d9 2024-02-04T11:20:27Z, linux/amd64)
listmonk_app  | 2024/03/27 15:32:21 init.go:150: reading config: config.toml
listmonk_app  | 2024/03/27 15:32:21 init.go:289: connecting to db: listmonk_db:5432/listmonk
listmonk_app  | 2024/03/27 15:32:21 init.go:618: media upload provider: filesystem
listmonk_app  | 2024/03/27 15:32:21 init.go:541: loaded email (SMTP) messenger: username@mailpit
listmonk_app  | ⇨ http server started on [::]:9000
listmonk_app  | 2024/03/27 15:32:46 manager.go:409: start processing campaign (Copy of Copy of Testkampagne)
listmonk_app  | 2024/03/27 15:32:46 pipe.go:217: campaign (Copy of Copy of Testkampagne) finished

I hope this helps finding the issue. I am quite satisfied with listmonk in general, but i am worried, that my campaign stops randomly and i need to send mail campaigns twice.

Let me know, if i should open another issue for the sliding window limit warning on pausing campaigns.

Thanks!

@MaximilianKohler
Copy link
Contributor

Hey @knadh good news! I think I figured out the problem. In my report a couple comments up #1762 (comment) I was sending out a campaign to 150k people.

  • I discovered the the campaigns are sent out in the reverse order of the list /admin/subscribers/lists/423. So you go to the last page (7500), and those subscribers are emailed first.
  • I clicked through a few of those pages and noticed there were a few pages with only blocklisted emails.
  • I looked in /admin/settings -> performance -> batch size, and saw the number was 500.

I'm pretty sure the issue occurs when all the subscribers in the batch are blocklisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation Potential bug. Needs investigation
Projects
None yet
Development

No branches or pull requests

5 participants