Getting timeout on Subscribers.GetActive

I have a PHP script I wrote for a client back summer 2010. The script kicks off via a load of a special page.

The script first uses the API to get a list of the lists by calling the API method clientGetLists
Then I loop through these lists and call API method subscribersGetActive for each list.

The following is the actual call. The var $list_id is set with above this line
subscribersGetActive( 0, $list_id, 'Subscribers.GetActive' );

Then for each subscriber returned in the array I perform some processing action. This list has been running great until this past week. Seem it hangs on one list which has 895 subscribers. I realize the call to the API will take time to return the results. Basically the script just stops execution at that point. I've checked the php.ini timeout and it is set to 30 seconds.

Is there some way to debug this? If I exclude this List from the loop the script will finish. There are other lists which have just as many subscribers. So wondering if it might be something with that List.

Thoughts? Suggestions?

codehooligans, 5 years ago

Nevermind. I turned on PHP error_reporting. Seems the script is dying in the array2xml function

309 process res
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 75 bytes) in ../cm_api/CMBase.php on line 378

Phil Phil, 5 years ago


From the error message, it looks like you might be trying to get all the active subscribers on a large list. The best idea is to move to version 3 of the API, where we offer paging when getting the active subscribers.

We do provide a php wrapper for v3, and for a variety of other reasons, we do recommend making the switch if you can.


Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free