Pending emails #1431
Replies: 16 comments 2 replies
-
Maybe there is some way to check Postal state via cron and restart it when is stucks? Is there any way to get number of pending emails from console? |
Beta Was this translation helpful? Give feedback.
-
Can you run Also can you monitor your server CPU and memory usage? It may be you need more of one or the other. |
Beta Was this translation helpful? Give feedback.
-
Hey, just an idea: check if your rabbitmq is running and postal is connected. |
Beta Was this translation helpful? Give feedback.
-
@jos0405 I think I have same issue.
|
Beta Was this translation helpful? Give feedback.
-
hi all, we're experiencing a similar issue but with a twist. our installation has an organizations with multiple servers. one of the servers is unable to send messages (messages remain with status "pending" in the queue), however, the other servers within that same organisation are running perfectly fine. the problematic server is actually a testing server, with exactly the same IP-Pool, domain and configurations, except the auto-generated configs (e.g. DKIM key and login data). in Postal-Status everything looks ok. Any ideas, similar experiences or tips? Thanks in advance for any input! |
Beta Was this translation helpful? Give feedback.
-
@ahmedaldabbagh you might have to examine the database to see if the messages have been claimed by a now-killed process or have been stuck in some other fashion. There is another issue about this somewhere but I can't find it quickly. |
Beta Was this translation helpful? Give feedback.
-
thanks for the feedback @willpower232 , I have seen "locked" mails in the past. however, this "pending" issue is occurring to all mails sent since 24. July 2019 via the problematic server. I am wondering whether each server has it's own separate queue, which could mean the queue manager for that account is down. thanks for the input in any case. |
Beta Was this translation helpful? Give feedback.
-
Thanks for confirming, certainly possible something bad is happening with the queue. Do open a new issue if you find anything discussion worthy! |
Beta Was this translation helpful? Give feedback.
-
will do @willpower232. |
Beta Was this translation helpful? Give feedback.
-
It happened again. Now the reason is more obvious. First time Postal stoped sending emails when hosting closed outgoing 25 port (to which Postal was connected). This time Postal stoped sending emails when there were DNS issues at the server/hosting. And again manual restarting Postal fixed the issue:
Also noticed that before restarting
After restarting it disappeared:
Apparently when there are connection issues something gets broken and Postal just keeps adding emails to the queue without sending them. To reprodue the issue maybe try to run Postal and close outgoing port which Postal is listening or try to mess up DNS on the server somehow. |
Beta Was this translation helpful? Give feedback.
-
Now everything works fine, but
Just wondering if this has any meaning? |
Beta Was this translation helpful? Give feedback.
-
I'm afraid I don't know that much about the depths of systemd. Is your systemd config based on https://github.com/postalhq/postal/wiki/Starting-on-boot ? |
Beta Was this translation helpful? Give feedback.
-
Yes. Just looking for some way to check Postal state via cron and restart it when is stucks. |
Beta Was this translation helpful? Give feedback.
-
Here is the bash script to monitor number of pending emails in Postal and restart it if needed:
|
Beta Was this translation helpful? Give feedback.
-
Looks interesting, I'd say it might also be worth querying for how long the messages had been pending for. Its possible someone sending a lot of emails might end up not being able to send any messages because postal keeps restarting! |
Beta Was this translation helpful? Give feedback.
-
Sorry, know this is old but for the benefit of anyone else potentially having the same issue, reinstalling rabbitmq and recreating the connection resolved this for me.
|
Beta Was this translation helpful? Give feedback.
-
Hi. Having the same issue as #506
postal status
is OK, but messages are just marked as "pending" and not being sent for 2 days. There are no any error messages in logs.What can be the reason and how to force postal to send them?
Beta Was this translation helpful? Give feedback.
All reactions