-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
What do your logs show? |
Logs are always empty. |
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. |
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 |
Ah, EOF indicates a broken network connection with the SMTP. |
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:
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. |
In case it's helpful, I found this open-source app that works like a verbose log, listing all the emails sent by SES:
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. |
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
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. |
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. 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:
If the sliding window limit is disabled on campaign start, i can pause and unpause the campaign without issues. In the logs i see Here are the logs:
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! |
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'm pretty sure the issue occurs when all the subscribers in the batch are blocklisted. |
@knadh I finally got a chance to save the logs. Below is the error I get when a campaign runs. Can you please let me know how I can fix this issue?
|
@jackraj97 did you look through the other issues that cover that error? https://github.com/knadh/listmonk/issues?q=is%3Aissue+timed+out+waiting+for+free+conn+in+pool |
Hi @knadh, We are also facing the same issue as @MaximilianKohler . The list had 200K subscribers and the campaign was marked as finished just after sending to 37 subscribers. We observed that the list has many blocklisted users and the email IDs exists in multiple list. We could not find anything in the logs.
|
Any solution to this problem? For my client email is not being sent to anyone. |
I have this issue but without any blocked users. |
As a note, if the campaign is "finished" and you update the cell "status" of the table "campaigns" to "paused", you can continue the campaign but it will stop again, sometimes after sending some, sometimes immediately. |
Any updates on how to solve this ? |
As a workaround, drastically increasing the batch size worked for me. I have only very small lists (<100 subscribers), so I do not know the consequences for larger lists. For other updates regarding this issue, you can refer to #1931 |
This is being actively tracked and investigated here: #1931 - I'll close this thread so that we can consolidate the discussions in one place.
This seems to be a clue. I still have not been able to reproduce this (please check the thread on #1931) |
You couldn't reproduce the blocklist issue I described? #1762 (comment) However, I think the batch size defaults to 500, and since @ohaeusler is sending to <100 at a time, it couldn't be the same blocklist issue. |
Hi @MaximilianKohler. I couldn't. Please see #1931 (comment) The subscribers are always ordered in the ascending order of their ID when batching. The condition to pull the batch is |
This has been a hair-pulling rabbit hole of an issue. #1931 and others. When the `next-campaign-subscribers` query that fetches $n subscribers per batch for a campaign returns no results, the manager assumes that the campaign is done and marks as finished. Marathon debugging revealed fundamental flaws in qyery's logic that would incorrectly return 0 rows under certain conditions. - Based on the "layout" of subscribers for eg: a series of blocklisted subscribers between confirmed subscribers. A series of unconfirmed subscribers in a batch belonging to a double opt-in list. - Bulk import blocklisting users, but not marking their subscriptions as 'unsubscribed'. - Conditions spread across multiple CTEs resulted in returning an arbitrary number of rows and $N per batch as the selected $N rows would get filtered out elsewhere, possibly even becoming 0. After fixing this and testing it on our prod instance that has 15 million subscribers and ~70 million subscriptions in the `subscriber_lists` table, ended up discovered significant inefficiences in Postgres query planning. When `subscriber_lists` and campaign list IDs are joined dynamically (CTE or ANY() or any kind of JOIN that involves) a query, the Postgres query planner is unable to use the right indexes. After testing dozens of approaches, discovered that statically passing the values to join on (hardcoding or passing via parametrized $1 vars), the query uses the right indexes. The difference is staggering. For the particular scenario on our large prod DB to pull a batch, ~15 seconds vs. ~50ms, a whopping 300x improvement! This patch splits `next-campaign-subscribers` into two separate queries, one which fetches campaign metadata and list_ids, whose values are then passed statically to the next query to fetch subscribers by batch. In addition, it fixes and refactors broken filtering and counting logic in `create-campaign` and `next-campaign` queries. Closes #1931, #1993, #1986.
Version:
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.
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:


The text was updated successfully, but these errors were encountered: