2012.02.16 09:50:46 p.m.
iPhone Nightly Data Usage -- Culprit found? Tags: iphone

TL;DR

Yes, the iPhone actually can use a lot of extra data

Since getting a new iPhone 4S, I've noticed that it transfers much more over the cellular data network on its own than I do manually. For a while, I was even manually turning data on when I needed it, then turning it off again. Needless to say, this was quite tedious. The majority of the unnecessary data transfers seemed to be occurring at night as I slept. Online discussions of similar issues were generally inconclusive. Many commenters seemed to place the blame on the user, saying that they only thought the data was being used at night since AT&T was aggregating the days usage and reporting it at night. Using the Data Usage Defender app, I verified that the data was, in fact, being used during the night time.

Another article claims that AT&T was in fact transferring exorbitant amounts of data in the wee hours for diagnostic reasons, but that you weren't supposed to be charged for this usage. They even claim that this data is transfered when the Cellular Data options were off... To me, this explanation seemed unlikely.

A Gizmodo article posted a sloppily worded "official explanation" from AT&T that late night data usage on the bill is just a "routine update of your daily data activity on your device to ensure the accuracy of your data billing. Customers are not charged for data usage, given that no data session is generated.". Apparently this was again interpreted as saying "its just the aggregate data used from earlier in the day". But, the statement, and especially that last bit about not being charged for data usage just plain makes no sense to me.

So, I struck out on my own.

The search (abbreviated)

After turning off any data usage settings that I could find (iCloud's sync, the App Store's "Use Data", etc.), it looked like my data usage was under control. Over the following month, I woke up a handful of times to find another 10M used overnight. However, this was infrequent enough that it wasn't going to threaten to overrun my data plan, so, although annoyed, I wasn't too worried.

Then, a few nights ago, it started again. 10M in one night. 15 the next. Nothing at all the third night. Another 10M last night. WTF? This had to stop. But, first, why was one night data free? It dawned on me that I hadn't plugged the phone in that night (I get about two days worth of battery with normal usage). So, this morning I plugged the phone in and let it sit for about two hours. Another 3M was used. Somehow I had to figure out what was using all of my data.

Using a VPN with a proxy server set up, it is possible to dump all traffic the iphone sends and receives. By looking at a dump of the data traffic, I found out that the phone was connecting to ax.init.itunes.apple.com roughly every minute and downloading a file called bag.xml. According to a blog post by @DHowett, this file is a list of information about all applications installed on the phone that is used to determine if any updates are available. For me, each transfer was running about 30K. Throughout the day, I have been able to reliably reproduce runaway data usage by plugging my phone in. I have also been able to verify that it is almost entirely due to downloading bag.xml.

Possible Resolution

Since the App Store appears to be the source of my data usage, I once again looked at the Store configuration settings. The only thing that was left on was the "Apps" setting under "Automatic Downloads". (Note that "Use Cellular Data was not turned on.) On a hunch, I turned off the auto-app-download feature, plugged in the phone, and made some lasagna with my wife. After over an hour had passed, I checked the phone. No data was used during that period (or at least less than the 10K precision of Data Usage Monitor). So, I turned the option back on, waited a bit longer, and sure enough returned to data usage at the prior rate.

TL;DR

So, there it is. The App Store's Automatically Download Apps feature can cause constant, repetitive checking in with the App Store while the phone is plugged into power. For me, this was using data at the alarming rate of 30K per minute, which if constant throughout the month, would have led to ~1.3G of data usage.

Now, I still don't know why (thankfully) this has only been an intermittent issue for me. Some condition clearly has to be satisfied to trigger the constant checking for updates by the App Store. One possibility is that I currently have a few apps that actually do have updates waiting, whereas I was previously fairly quick to download the updates.. At this point, however, that is just speculation. Regardless, it looks like Apple's software has a real bug that is (potentially) costing unwary customers real money.

Update (Feb 17, 2012 12:22)

A talked with Apple support this morning (after setting up an appointment yesterday). Very pleasant experience. The initial rep took my information and quickly escalated to a senior support advisor. He took down a more thorough description and passed it along to engineering. It may take a few days to hear back from them, but at least it quickly got pushed through to the correct channels. So far, this has definitely been my best experience with customer support at a large company.