Having a bit of a weird issue with a script that's previously been running for a couple of months that searches a MailChimp list for users that are subscribed but whose accounts haven't been updated in over 2 weeks (we're running nightly updates/sync on a mailing list from a database).
It was working absolutely fine up until about a week ago when I made a couple of changes. I went back and tried to put it how it was but am still getting an empty response for the query. This is the query:
It turned out to be an issue with cURL timing out. The error handling is pretty poor in that API and the timeout is set at 10 seconds. As the list is quite large and the query is quite granular, it was taking longer than 10 seconds to process.