-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comment notifications held in queue and being sent out in small batches #317
Comments
@bobinoz Thanks for opening a separate issue for this. @jaswsinc Anything come to mind for this? |
@bobinoz Thank you for that detailed report. Debug InstructionsI'd like to ask if you can download this updated file and upload it via FTP, allowing it to override your existing copy of: With that new file in place, you should then find that Comment Mail records each queue processing event by leaving behind a log file here: Once you have collected the contents of |
Okay, I have uploaded the PHP file to the path you have suggested after renaming the existing queueprocessor.php file by putting an X in front of it. I did this through my cPanel as I do not have an FTP client installed on this PC. Hope that is okay. How do I find the wp-content/cm-debug.log though? If I go to www.mywebsite.com/wp-content/cm-debug.log I get a 404. So how can I access the log? As you've probably guessed, I'm not good at the techie stuff. |
@jaswsinc Uploaded the file and after a 17 hour timespan, 20 emails were sent out (despite over a hundred in queue). I looked for the cm-debug.log file and it's not in my wp-content folder. |
@aptharsia If the |
So I uploaded the PHP file through cPanel as mentioned above, and as also mentioned, I couldn't find where to view the log. Then I saw your reply to aptharsia and created Then I tried to answer a comment live on my website and got the following error page... The
So I have deleted the debug PHP file and reinstated the original |
@jaswsinc Created the file and had a batch of 15 go out but nothing was written to the file. Set to 666. |
@jaswsinc Just a quick update; as I thought, this problem just builds and builds. I now have 693 comments held in the queue, that represents a 12 hour backlog. As people keep commenting it could get to a stage where it simply cannot catch up with itself. Thought you might like to also know that whilst most of them say... n/a; awaiting processing Under the Holding Until section, a few of them are now saying... Nov 19, 2016 4:53 am |
@jaswsinc Okay, I think this is a significant development. As I just mentioned, I was staring at a 693 comment queue that would have taken 12 hours to clear. As a test, I decided to turn off SparkPost which I can do via the plug-in I am using and instead send emails through my own hosts server. The reason I use SparkPost is because I often exceed my hosts limits, but I do know it's okay to go through them now and then. Anyway, the result has been significantly different. Through this server 77 emails got delivered from this queue every 30 minutes on the dot. Regular as clockwork. Within five hours the whole queue was gone compared to the 12 hours it would have taken with the dribs and drabs sending through SparkPost mentioned above in my first post. This arrangement is perfect for my hosts, because they have a 400 email an hour limit, with this plug-in only sending 154 emails and hour, I won't be exceeding that. Anyway, the point is obvious, maybe this problem isn't with Comment Mail, maybe it with the email server. |
I don't have SparkPost. My host says my email server is limited to 500 emails an hour but I don't hit that per hour. |
@bobinoz Can you link us to the SparkPost plugin you were using? |
Ok, here's a strange occurrence. When I make a comment as admin, small batches of notifications are sent. Tested it 4 times and each time about 14 notifications are sent out. Edit: Sent out all pending comments by making comment as admin (worked on any post.) That suppose to happen? |
@bobinoz Thank you for the follow-ups. Very helpful. Based on the details you've given here, I would recommend that you bump the Max Execution Time setting in Comment Mail from
You can find out what Create:
|
@raamdev See my previous post. I propose that we bump the default value of I say that because from the reports coming in here, it almost sounds like the issue could be attributed to theme/plugin overhead on some sites. For example, imagine a site that is running 25 other plugins, one of those creates a bottleneck, and then Comment Mail's Queue Processor runs quietly behind-the-scenes via WP Cron. If the entire WordPress installation is bogged down, Comment Mail will be bogged down also. In such a scenario, Another example would be a case where the underlying mail server (e.g., SparkPost plugin, WP Mail SMTP configuration, etc) have been configured to use an external SMTP server that responds slowly at times, or responds slowly all the time. Here again, Another example would be a very slow MySQL connection; e.g., database bogged down. |
@aptharsia writes...
That sounds like the expected behavior to me. When you leave a comment as admin it is instantly approved and Comment Mail's Queue Processor runs in real-time at that moment. When this happens, by default, Comment Mail will process up to However, if emails only seem to go out whenever someone leaves a comment, that could be an indication that only real-time processing is taking place, and that the CRON-driven Queue Processor that runs every 5 minutes behind-the-scenes is not doing its job. In other words, that could be an indication that Comment Mail's Queue Processor has been unable to run via CRON for some reason. You can inspect the CRONs on your WP installation with this plugin and do a review. https://wordpress.org/plugins/wp-crontrol/ |
@jaswsinc I have moderated comments so I'm the only one that has instant approval. Other than when I comment nothing is sent. I have WP Crontol installed and this is what the queue processor says, "_cron_comment_mail_queue_processor None 2016-11-19 08:18:53 (58 seconds) 5 minutes" It always says "Next Run" is 58 seconds but I don't think it ever does it until I comment. There's nothing about Comment Mail in the WP-Cron Schedules. |
@aptharsia @bobinoz Regarding the In summary... Very sorry. If you can both go back and follow these instructions again it should work for you now; i.e., you should get the |
@aptharsia Thank you. If can keep tabs on this and report back again after a few hours I'd really appreciate it. Note also that WP CRON jobs require that your site has traffic; i.e., a CRON should run whether or not anyone leaves a comment, but WP CRON jobs do require that someone is periodically visiting some page on the site. If you see a CRON job that is seemingly stuck, hit the front page of your site a few times and it should then run as expected. That's just how WordPress works. |
@jaswsinc I've got about 20k+ visitors a day so don't think that's the problem. I've reuploaded the file so will let you know if the log reports anything. Thank you. |
The cm-debug file so far...just a snippet but all of them similar (these aren't being processed themselves, I'm still leaving comment as admin at various times to get emails sent out): Version: 161118 Version: 161118 Version: 161118 Version: 161118 |
@aptharsia Thank you very much for providing that. So just to confirm, none of the entries in your |
All say FALSE, no TRUE. |
@raamdev - Sure, the SparkPost plugin I have been using is... |
@jaswsinc I don't have the pro version, so unable to make those changes. My queue process is on the default settings, I posted an image in my first comment on this thread, right at the top. |
@jaswsinc I'm afraid pretty much the same thing happened when I downloaded your new PHP file. I uploaded this file through cPanel to the correct location and renamed the old Queue Processor by placing an x in front of it. Uploading the new Queue Processor file did automatically create the debug log file with 666 permissions, but when I tried to answer a comment I again saw an error page, 501. So again I had to undo the changes and revert back to the original Queue Processor. My web host does have quite a few security settings, so maybe that's why I cannot get it to work? |
@aptharsia writes...
Thank you. So that explains what the problem is in your case. The Comment Mail Queue Processor is not running via WP Cron on your installation. This gives us a research path now. We can work to identify what may prevent the Comment Mail CRON job from running in some scenarios. Would you mind telling us who your hosting provider is? |
@bobinoz writes...
Copy that.
You could try setting permissions to 644, or even 600 and see if that makes a difference. Otherwise, I'd contact your hosting provider and see if they can shed light. If it's not a permissions issue, then, as you noted, it could be a security feature on that web host I'm unaware of. |
@jaswsinc Host is BigScoots. I'm on a VPS, not shared hosting. |
Get this message when I manually run the queue processor in WP Crontrol: Not sure if that is what is doing it or not. |
Hi guys After nearly 2 years of this plug-in working fine, Comment Mail has stopped working again, and it would appear this problem started after I updated to WordPress 4.9.7 on 5 July. It does process four or five comments in real-time when I answer a comment, but it now never sends out comment notifications via the Cron. I'm posting this here because as has been mentioned in the comment just above this one, when I manually run the Cron in WP-Cron Events I also get the message... The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled. In cPanel though, I have a Cron set for every 30 minutes that ends with... public_html/wp-cron.php >/dev/null So for the last three weeks I have been manually processing the queue, and that's been a real pain. Desperate to get this fixed if I can, and I'm happy to upgrade to pro if that will fix it. I am still using SparkPost, but even when I turn it off, the same thing happens. Can anyone help me with this? Many thanks, Bob |
Hi everybody
I have installed Comment Mail and tested it for a few days now and noticed comments are being held in the queued (pending) notifications area with the message 'n/a; awaiting processing'. They are getting sent, there just seems to be a long delay.
After I had installed and activated Comment Mail, I started answering comments on various pages with different numbers of subscribers. It sent out 76 emails immediately but then after that it started holding them in the queue for processing. What it seems to be doing since then is sending out little batches of emails every now and then at around 10 or 20 minute intervals. The most emails it seems to send out from the queue any one time is 21. Sometimes it is as few as 5. The maximum gap between sending them appears to be 30 minutes.
In the space of about seven hours, it has managed to send out all 363 emails in the queue which is now empty as it's late at night here and new comments have stopped coming in. If it were a busy day though, I can imagine the queue just building up until eventually it could take seven or eight hours before catching up with itself. I am using SparkPost to deliver email, they do not have any hourly limits. As far as I'm aware, they just have a daily limit of 10,000 emails.
I've checked the settings in Comment Mail → Config. Options → Queue Processor Adjustments, but cannot make changes as that's only available in the pro version. However, the settings seem good to me, if I am reading it correctly it should send 100 emails at a time and do that every five minutes.
Any idea why it isn't able to do that? Any help you can offer me with this would be much appreciated, many thanks, Bob
The text was updated successfully, but these errors were encountered: