status = sending, never finsishes

1,203 views
Skip to first unread message

geoff

unread,
Feb 2, 2011, 6:44:18 PM2/2/11
to MailChimp API Discuss
I have code that sends out pseudo transactional campaigns. Most of the
time, the emails go out just fine. Sometimes, the campaign is stuck in
'sending' mode and the emails don't go out. Any ideas what to do about
this? I'm happy to provide the cid's if anyone from the api team is
around to look.

Thanks,
Geoff

jesse

unread,
Feb 2, 2011, 6:54:12 PM2/2/11
to MailChimp API Discuss
If we ever see one has hung for more than 10 minutes on a subsequent
call, we automatically reset the status and retry the send which
should pick up anyone that was missed. See if that works out - if not,
I need a username or "u" parameter from a hosted form and the campaign
id.


jesse

geoff

unread,
Feb 3, 2011, 11:56:47 AM2/3/11
to MailChimp API Discuss
Is there a way to grab the cid from the http://us2.admin.mailchimp.com/campaigns/
list? I don't see an obvious way to do it.

jesse

unread,
Feb 3, 2011, 12:03:14 PM2/3/11
to MailChimp API Discuss
You can dig around in popup preview and grab the id parameter from the
archive link or you can just use the campaigns() method:
http://apidocs.mailchimp.com/1.3/campaigns.func.php

Although if you are sending the campaign, you are already passing that
to the campaignSendNow() call.


jesse

On Feb 3, 11:56 am, geoff <mene...@gmail.com> wrote:
> Is there a way to grab the cid from thehttp://us2.admin.mailchimp.com/campaigns/

geoff

unread,
Feb 3, 2011, 12:38:19 PM2/3/11
to MailChimp API Discuss
Can you check on cids 4c36e71af4 and 9ebc1727fb? The userid is
'refreshingnote' (don't know the user_id and haven't run across the u
parameter on the site).

I don't want to send campaignSendNow() on either campaign because
there are now 2 different subscribed emails on the list and I don't
want both of them to get both emails.

jesse

unread,
Feb 3, 2011, 12:41:52 PM2/3/11
to MailChimp API Discuss
There's nothing to check unless when you send them they don't reset
and send. If you don't want someone to receive the email at this
point, unsub them before sending the campaign.


jesse

geoff

unread,
Feb 3, 2011, 12:53:59 PM2/3/11
to MailChimp API Discuss
Okay, I just tried resending 9ebc1727fb ... status is still Sending
though.

jesse

unread,
Feb 3, 2011, 1:07:51 PM2/3/11
to MailChimp API Discuss
Two things:

* Your API stats say you didn't just make the call:
https://us2.admin.mailchimp.com/account/api/

* From there, see that the campaignSendNow() calls are failing? What's
the error being returned?


jesse

geoff

unread,
Feb 3, 2011, 1:17:30 PM2/3/11
to MailChimp API Discuss
Thanks for being so responsive Jesse!

Just tried again (to print out the entire retval) and the email went
through. But the api stats are still showing no usage. (And I actually
don't remember them ever updating). I'm not sure what's going on
there.

geoff

unread,
Feb 3, 2011, 1:38:05 PM2/3/11
to MailChimp API Discuss
It just happened again.

I tried sending 7c27473286 at 1:18, it hung for 10 minutes, tried
sending again at 1:29, api->errorCode is empty but it's still hanging.
Usage stats on api still show 0 but now I see two failed calls on
"Last 24 hours of API calls" (though that may be me trying to SendNow
before the 10 minutes are up)

will try again in a few minutes...

geoff

unread,
Feb 3, 2011, 1:44:31 PM2/3/11
to MailChimp API Discuss
Just tried again at around 6:41- the return value is not actually
being set. Does that mean it failed. There's no info in the api-
>errorCode though. Did the api call bail out halfway through or
something?

geoff

unread,
Feb 3, 2011, 2:10:44 PM2/3/11
to MailChimp API Discuss
ok, so I was doing error checking by looking at api->errorCode rather
than retval. It turns out that campaignSendNow() has just been failing
A LOT today. (retval being empty). I don't really know what to do...I
remember this was a problem before and I wrapped my code in a while
loop to send but I hate doing that and removed it. Is there a problem
with API today?

geoff

unread,
Feb 3, 2011, 2:25:28 PM2/3/11
to MailChimp API Discuss
Here's the problem. campaignSendNow fails without a retval or
errorCode set:

$ php resend_campaign.php d103cf6283
trying to resend cid 'd103cf6283'
Unable to load campaignSendNow()!
Code=
Msg=
Bailing Out, no email sent
retval =

The campaign however is set to 'sending' and can't be resent for
another 10 minutes, this time with a proper retval and errorCode if
the attempt to send is made again with in 10 minutes.

$ php resend_campaign.php d103cf6283
trying to resend cid 'd103cf6283'
Unable to load campaignSendNow()!
Code=313
Msg=This Campaign is currently being sent and can not be sent
again until it has finished.
Bailing Out, no email sent
retval =

If the send failed, the status should not be set to 'sending' and api
calls should not need to wait 10 minutes to try again.

jesse

unread,
Feb 3, 2011, 2:43:04 PM2/3/11
to MailChimp API Discuss
I see your problem - stop using psuedo-transactional campaigns
incorrectly and the issue will go away. They are intended to be
created ONCE per necessary campaign and then sent over and over. Since
you are incorrectly creating them over and over nothing I've said
would have applied.


jesse

geoff

unread,
Feb 3, 2011, 3:10:56 PM2/3/11
to MailChimp API Discuss
That doesn't explain why the send call would be failing so
consistently, but ok, thanks.
Reply all
Reply to author
Forward
0 new messages