Message is currently being processed.
We have send a few days ago a newsletter to 20,000 subscribers. Queue was processed normally and newsletter reached subscriber's mailbox.
But, currently after 4 days there are 3467 queued messages and upon investigation i can see that those messages have not yet been processed yet. "Message is currently being processed"
root@:~# postal status Procodile Version 1.0.23 Application Root /opt/postal/app Supervisor PID 28535 Started 2019-03-07 20:00:19 +0200
|| web || Quantity 1 || Command bundle exec puma -C config/puma.rb || Respawning 5 every 3600 seconds || Restart mode usr1 || Log path none specified || Address/Port none || => web.1 Running 07/03/2019 pid:28541 respawns:0 port:- tag:-
|| worker || Quantity 10 || Command bundle exec ruby script/worker.rb || Respawning 5 every 3600 seconds || Restart mode start-term || Log path none specified || Address/Port none || => worker.16 Stopping 07/03/2019 pid:31073 respawns:0 port:- tag:- || => worker.98 Running 08/03/2019 pid:8984 respawns:0 port:- tag:- || => worker.99 Running 08/03/2019 pid:8986 respawns:0 port:- tag:- || => worker.100 Running 08/03/2019 pid:8988 respawns:0 port:- tag:- || => worker.101 Running 08/03/2019 pid:8992 respawns:0 port:- tag:- || => worker.102 Running 08/03/2019 pid:8994 respawns:0 port:- tag:- || => worker.103 Running 08/03/2019 pid:8998 respawns:0 port:- tag:- || => worker.104 Running 08/03/2019 pid:9002 respawns:0 port:- tag:- || => worker.105 Running 08/03/2019 pid:9004 respawns:0 port:- tag:- || => worker.106 Running 08/03/2019 pid:9008 respawns:0 port:- tag:- || => worker.107 Running 08/03/2019 pid:9011 respawns:0 port:- tag:-
|| cron || Quantity 1 || Command bundle exec rake postal:cron || Respawning 5 every 3600 seconds || Restart mode term-start || Log path none specified || Address/Port none || => cron.11 Running 08/03/2019 pid:9032 respawns:0 port:- tag:-
|| smtp || Quantity 1 || Command bundle exec rake postal:smtp_server || Respawning 5 every 3600 seconds || Restart mode usr1 || Log path none specified || Address/Port none || => smtp.1 Running 08/03/2019 pid:9016 respawns:0 port:- tag:-
|| requeuer || Quantity 1 || Command bundle exec rake postal:requeuer || Respawning 5 every 3600 seconds || Restart mode term-start || Log path none specified || Address/Port none || => requeuer.11 Running 08/03/2019 pid:9033 respawns:0 port:- tag:-
is something that wrong on my worker installation or on my postal.yml ? i have only added workers: quantity: 10 threads: 15
And yes, I am currently facing this issue too.
quantity: 100 threads: 120
Server Spec
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit CPU(s): 40 On-line CPU(s) list: 0-39 Thread(s) per core: 2 Core(s) per socket: 10 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 62 Model name: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz Stepping: 4
What's the solution to this?
Thanks
@wh4u your workers have quite a high number so its possible that the messages have ended up locked in the database by older processes that no longer exist. Are you able to investigate the database and see the rows for the messages that haven't been delivered?
@saporus would you care to share your postal status also?
@willpower232 , Thank you for your reply. More workers=faster delivery? i thought that was the rule. Based on cpu count.
More workers can certainly help send out all your messages but its also worth bearing in mind the CPU and memory limit of your server.
Your workers all have wildly different numbers so its possible some of the individual worker processes have been crashing out and respawning which might explain why some messages weren't sent.
You could also monitor your resource usage during the sending of the messages to see what happens and whether there is room for an increase in worker count.
@willpower232 Thanks for the response, here goes the result
Procodile Version 1.0.23 Application Root /opt/postal/app Supervisor PID 32083 Started 2019-03-12 01:22:14 +0530
- worker.63 is not running (Failed)
- worker.64 is not running (Failed)
- worker.65 is not running (Failed)
- worker.66 is not running (Failed)
|| web || Quantity 1 || Command bundle exec puma -C config/puma.rb || Respawning 5 every 3600 seconds || Restart mode usr1 || Log path none specified || Address/Port none || => web.1 Running 01:22 pid:32089 respawns:0 port:- tag:-
|| worker || Quantity 4 || Command bundle exec ruby script/worker.rb || Respawning 5 every 3600 seconds || Restart mode start-term || Log path none specified || Address/Port none || => worker.4 Stopping 01:22 pid:32100 respawns:0 port:- tag:- || => worker.11 Stopping 01:22 pid:32120 respawns:0 port:- tag:- || => worker.12 Stopping 01:22 pid:32122 respawns:0 port:- tag:- || => worker.16 Stopping 01:22 pid:32136 respawns:0 port:- tag:- || => worker.17 Stopping 01:22 pid:32141 respawns:0 port:- tag:- || => worker.23 Stopping 01:22 pid:32159 respawns:0 port:- tag:- || => worker.25 Stopping 01:22 pid:32166 respawns:0 port:- tag:- || => worker.30 Stopping 01:22 pid:32182 respawns:0 port:- tag:- || => worker.33 Stopping 01:22 pid:32188 respawns:0 port:- tag:- || => worker.36 Stopping 01:22 pid:32200 respawns:0 port:- tag:- || => worker.37 Stopping 01:22 pid:32202 respawns:0 port:- tag:- || => worker.40 Stopping 01:22 pid:32211 respawns:0 port:- tag:- || => worker.41 Stopping 01:22 pid:32219 respawns:0 port:- tag:- || => worker.42 Stopping 01:22 pid:32226 respawns:0 port:- tag:- || => worker.43 Stopping 01:22 pid:32228 respawns:0 port:- tag:- || => worker.44 Stopping 01:22 pid:32231 respawns:0 port:- tag:- || => worker.45 Stopping 01:22 pid:32235 respawns:0 port:- tag:- || => worker.46 Stopping 01:22 pid:32241 respawns:0 port:- tag:- || => worker.49 Stopping 01:22 pid:32256 respawns:0 port:- tag:- || => worker.50 Stopping 01:22 pid:32272 respawns:0 port:- tag:- || => worker.63 Failed 01:27 pid:20034 respawns:5 port:- tag:- || => worker.64 Failed 01:27 pid:20036 respawns:5 port:- tag:- || => worker.65 Failed 01:27 pid:20038 respawns:5 port:- tag:- || => worker.66 Failed 01:27 pid:20040 respawns:5 port:- tag:-
|| cron || Quantity 1 || Command bundle exec rake postal:cron || Respawning 5 every 3600 seconds || Restart mode term-start || Log path none specified || Address/Port none || => cron.5 Running 01:27 pid:19415 respawns:0 port:- tag:-
|| smtp || Quantity 1 || Command bundle exec rake postal:smtp_server || Respawning 5 every 3600 seconds || Restart mode usr1 || Log path none specified || Address/Port none || => smtp.1 Running 01:27 pid:19391 respawns:0 port:- tag:-
|| requeuer || Quantity 1 || Command bundle exec rake postal:requeuer || Respawning 5 every 3600 seconds || Restart mode term-start || Log path none specified || Address/Port none || => requeuer.4 Running 01:32 pid:24537 respawns:3 port:- tag:-
@willpower232 , so i need a phpmyadmin to view and delete locked processes ? which is the suggested method to delete current non processed messages ?
@wh4u a desktop client would probably give you an easier experience but obviously use what you know. The main postal database has a queued_messages table which will tell what what the messages are locked by. You should be able to null out those columns and stick in a future retry date and see what happens.
@saporus it looks like your Postal is having issues starting all your workers, it might be worth lowering the number you have and keeping an eye on the memory usage during Postals start up.
We're struggling to keep track of genuine bugs with the huge volume of user support in the issue tracker. We've created a new Google Group for user support issues which is where any support issues should be directed: https://groups.google.com/forum/#!forum/postal-support
I'll close this issue but you can re-post with a link to it in the forum if you still require assistance.