Mystery of stuck in pending campaign

Brinnington

New Member
Hi everybody,

I have a campaign stuck in pending sending for two days and would really appreciate your advice.

MailWizz has been running fine until this campaign became stuck in pending two days ago (19 July).

MailWizz has been sending out more or less two campaigns daily on the same host for over a year now. These are small campaigns, less than 5000 contacts in each one.

The campaigns are sent out through the SparkPost API.

I tired to fix it by increasing the Backend >> Settings >> Cron >> Delivery settings from 5 Campaigns at once to 100. But that didn't work.

Because it is a shared host, I don't have access to SSH.

In my searches for a solution or a reason for this sudden problem, I found this in Backend >> Misc >> Application logs:

2018/07/19 08:46:34 [error] [exception.CHttpException.404] [185.75.141.32] exception 'CHttpException' with message 'The requested page does not exist.' in /var/www/vhosts/example.com/httpdocs/mailwizz/apps/frontend/controllers/CampaignsController.php:223
Stack trace:
#0 [internal function]: CampaignsController->actionTrack_url('le53wfmb72ntf', 'x0u32agshtduu', 'c0974a7156ac2a2...')
#1 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(CampaignsController), Array)
#2 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(CampaignsController), Object(ReflectionMethod), Array)
#3 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#4 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#5 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#6 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/CWebApplication.php(282): CController->run('track_url')
#7 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/web/CWebApplication.php(141): CWebApplication->runController('campaigns/track...')
#8 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/common/framework/base/CApplication.php(185): CWebApplication->processRequest()
#9 /var/www/vhosts/example.com/httpdocs/mailwizz/apps/init.php(233): CApplication->run()
#10 /var/www/vhosts/example.com/httpdocs/mailwizz/index.php(18): require_once('/var/www/vhosts...')
#11 {main}
REQUEST_URI=/mailwizz/index.php/campaigns/le53wfmb72ntf/track-url/x0u32agshtduu/c0974a7156ac2a28e0b758f965f23e89f9dc6b49
---
2018/07/19 13:20:33 [error] [application] Cannot find a valid server to send the campaign email, aborting until a delivery server is available!​

This "Cannot find a valid server" error then repeats.

Now this just goes over my head. So any advice from you would be much appreciated.

Best,

Bob
 
@Brinnington (and @zito calderon ) - Pending sending usually says the campaign is not picked up by the cron job, so the most obvious question is: is the cron job running ? You can view this from backend > misc > cron jobs history and see if new cron jobs are added. If they are not, then smth happened with the cron job, so check that. If records are added, then simply try to increase the number of campaigns at once from Backend > Settings > Cron, double the number, see how that helps.
 
@twisted1919

Thanks very much for the advice. I checked the backend > misc > cron jobs history to see if new cron jobs are being added, and it seems to me that they are:

send-campaigns index Success 0.11 seconds 6.25 MB 7/25/18, 1:39 PM
process-delivery-and-bounce-log index Success 0.03 seconds 2.25 MB 7/25/18, 1:39 PM
send-campaigns index Success 0.11 seconds 6.25 MB 7/25/18, 1:38 PM
send-transactional-emails index Success 0.02 seconds 2.25 MB 7/25/18, 1:38 PM
send-campaigns index Success 0.12 seconds 6.25 MB 7/25/18, 1:37 PM
send-campaigns index Success 0.12 seconds 6.25 MB 7/25/18, 1:36 PM
process-delivery-and-bounce-log index Success 0.03 seconds 2.25 MB 7/25/18, 1:36 PM
send-transactional-emails index Success 0.03 seconds 2.25 MB 7/25/18, 1:36 PM
send-campaigns index Success 0.27 seconds 6.5 MB 7/25/18, 1:35 PM
send-campaigns index Success 0.18 seconds 6.25 MB 7/25/18, 1:34 PM
send-transactional-emails index Success 0.02 seconds 2.25 MB 7/25/18, 1:34 PM
send-campaigns index Success 0.12 seconds 6.25 MB 7/25/18, 1:33 PM
process-delivery-and-bounce-log index Success 0.03 seconds 2.25 MB 7/25/18, 1:33 PM


I then increased the number of campaigns at once at Backend > Settings > Cron from 5 to 10. Unfortunately, this did not fix things. The campaign remains stuck at pending, and the Application log is still returning the "cannot find a valid server" error:

2018/07/25 13:43:02 [error] [application] Cannot find a valid server to send the campaign email, aborting until a delivery server is available!Campaign UID: rc488yvqq7b5b
2018/07/25 13:44:01 [error] [application] Cannot find a valid server to send the campaign email, aborting until a delivery server is available!Campaign UID: rc488yvqq7b5b

If you have any further advice, I would very much appreciate it.

Best,

Bob
 
@twisted1919

The first five points seem fine. However, I have noticed a discrepancy in point 6:

1) You actually have never created a delivery server in the first place. >> We use SparkPost to deliver the emails. It has been running fine for about a year now.

2) You did create a delivery server, but it is not confirmed. >> I'm not sure what confirmed is, but the delivery server has been running fine for a year now.

3) You have a valid delivery server, but it is specifically assigned to a customer other than the one which this campaign belongs to. >> We only have the one customer, so this doesn't make any difference.

4) You have a valid delivery server, system wide (not assigned to a customer), but in it’s settings, it is set to only send transactional emails. >> I can't find the "transactional emails" option in Delvery servers. Is it possible that because we use Sparkpost Web Api, there isn't such an option?

5) You have a valid server for all emails, but the settings from Backend > Settings > Customers > Servers (same for group setting) dictate that the customer must add his own servers in order to send the emails. >> the delivery server is already in place and has been running fine for about a year.

6) Everything above doesn’t apply, but still you can’t send campaigns, but you can send test emails for example. Sometimes, the PHP version from the web server can be distinct than the one from command line. For example, apache can run php 5.6 but the command line version can be 5.0. The command line version is the version called by the cron jobs, the tasks that try to actually send your campaigns. To check this, from command line, the command php -v should show you the right php version number for the cli. Keep in mind that some delivery servers, such as amazon ses web api for example, require php >= 5.3.3.

This is the one with the discrepancy:
Misc > PHP info > Web Server = PHP Version 5.4.16, Build Date Apr 12 2018 19:03:22..
Misc > PHP info > CLI = PHP Version => 5.6.37, Build Date ==> Jul 20 2018 13:16:40

By the way, this is also date conincident. The build date of the CLI PHP is July 20. The error appeared on July 19 / July 20.

If point 6 is the cause of the error, how do I go about resolving it?

Best,

Bob
 
HI folks,
Just to let you know, the campaign stuck in pending was solved by going to Backend >> Servers >> Delivery servers >> Update delivery server and changing the Monthly quota from 10000 to 0. Setting it to zero turns off the monthhly quota. The delivery server was then able to send out the rest of the campaign.
My thanks to twisted1919 for directing me to this solution. The guy is a genius.
Best,
Bob
 
Hi folks,
Just to clarify the location of the monthly quota:
Backend >> Servers >> Delivery servers >> View delivery servers >> click on the Update button and this will give you the Update delivery server page which has the Monthly quota field.
Best,
Bob
 
Back
Top