SilverSevens

Q: None of my iDevices can read my iTunes library after an hour of availibility. When I first start iTunes I can read the library, but after about 30 minutes my iPad's and iPhones can no longer access the library. I see it in the shared list, but no access.

None of my iDevices can read my iTunes library after about 30 minutes. My iDevices lose connection to my library and  I have to do one of the three following things in iTunes to regain connectivity: 1. Restart iTunes 2: Stop / Start Home Services 3: Start playing a song.

I'ts as if iTunes goes into a background or sleep mode. During the loss of connectivity my iDevices show that there's a library shared, but I cannot connect to it.

iPhone 4, iOS 5

Posted on May 13, 2012 1:34 PM

Close

Q: None of my iDevices can read my iTunes library after an hour of availibility. When I first start iTunes I can read the library, bu ... more

  • All replies
  • Helpful answers

first Previous Page 8 of 15 last Next
  • by SilverSevens,

    SilverSevens SilverSevens Jun 6, 2012 1:24 PM in response to aut0maticdan
    Level 1 (0 points)
    Jun 6, 2012 1:24 PM in response to aut0maticdan

    I haven't been tracking connections, but I will advise on my status after work. Usually dead by then. So we'll see.

  • by aut0maticdan,

    aut0maticdan aut0maticdan Jun 6, 2012 1:57 PM in response to aut0maticdan
    Level 1 (45 points)
    Jun 6, 2012 1:57 PM in response to aut0maticdan

    Mine needed another restart.  It looks like 100 is probably the magic number (max connections to HS).  Nobody has been home to touch the AppleTV/iTunes since the last restart (I'm ssh'd in from work).  Still on old AppleTV OS.  Its funny because it didn't happen all day yesterday.  :shrug:

     

    Wed Jun 06 16:47:14 -0400 2012 :: Number of HS connections: 99 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:19 -0400 2012 :: Number of HS connections: 99 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:24 -0400 2012 :: Number of HS connections: 99 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:29 -0400 2012 :: Number of HS connections: 103 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:34 -0400 2012 :: Number of HS connections: 104 (CLOSE_WAIT: 1)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:39 -0400 2012 :: Number of HS connections: 105 (CLOSE_WAIT: 2)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:44 -0400 2012 :: Number of HS connections: 106 (CLOSE_WAIT: 3)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:49 -0400 2012 :: Number of HS connections: 107 (CLOSE_WAIT: 4)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Wed Jun 06 16:47:54 -0400 2012 :: Number of HS connections: 108 (CLOSE_WAIT: 5)

    restarts: 2 :: last restart: Wed Jun 06 11:20:04 -0400 2012

    Home sharing is broken.  I am going to restart iTunes.

    iTunes restarted

    Wed Jun 06 16:48:39 -0400 2012 :: Number of HS connections: 103 (CLOSE_WAIT: 0)

    restarts: 3 :: last restart: Wed Jun 06 16:48:34 -0400 2012

    Home sharing is broken.  I am going to restart iTunes.

    iTunes restarted

    Wed Jun 06 16:49:25 -0400 2012 :: Number of HS connections: 0 (CLOSE_WAIT: 0)

    restarts: 4 :: last restart: Wed Jun 06 16:49:20 -0400 2012

    Home sharing is broken.  I am going to restart iTunes.

    iTunes restarted

  • by Davids8477,

    Davids8477 Davids8477 Jun 6, 2012 2:02 PM in response to SilverSevens
    Level 1 (69 points)
    Jun 6, 2012 2:02 PM in response to SilverSevens

    Well I have been trying a different test.

     

    I have had a book playing on the server (in a loop) for the last 12 hours - its a headless server volume turned down.

     

    In that time I have been able to load the server library on all 3 ATVs and 3 computers without any issues - no restarts etc.

     

    Not sure what this adds to this great thread - but information is information.

     

    I'll leave it running overnight and see what the morning brings.

  • by SilverSevens,

    SilverSevens SilverSevens Jun 6, 2012 2:06 PM in response to Davids8477
    Level 1 (0 points)
    Jun 6, 2012 2:06 PM in response to Davids8477

    Davids8477: Are you on the new ATV Firmware 5.0.2. So far it may be making a difference. At least with respect to what the script written above is showing.

  • by Davids8477,

    Davids8477 Davids8477 Jun 6, 2012 2:09 PM in response to SilverSevens
    Level 1 (69 points)
    Jun 6, 2012 2:09 PM in response to SilverSevens

    Yes all ATVs are on the latest.  I'll test it overnight with the loop running.  Then if that works I'll try it with no book playing to see if there is a difference.

  • by SilverSevens,

    SilverSevens SilverSevens Jun 6, 2012 4:29 PM in response to Davids8477
    Level 1 (0 points)
    Jun 6, 2012 4:29 PM in response to Davids8477

    Tried after work. Still good!!

    The slow buildup of CLOSE_WAITS may explain why it seemed the throughput would slowly degrade until if totally failed. Then would fly fresh after a restart. Only to slowly degrade again.

  • by Stephen Connor,

    Stephen Connor Stephen Connor Jun 6, 2012 4:36 PM in response to SilverSevens
    Level 1 (23 points)
    Photos for Mac
    Jun 6, 2012 4:36 PM in response to SilverSevens

    I can't reply with the same level of information as Aut0mation, as I'm not clever enough to understand his script. Good work though. All I can say is that things, so far, seem to be working properly now. The only problem I have had is a short wait to load the next program, while the external HDD spins up (the iMac screen stays asleep, I think). This is since updating to 5.0.2. Apple should give you guys credit, in their release notes!

  • by Stephen Connor,

    Stephen Connor Stephen Connor Jun 7, 2012 3:11 AM in response to Stephen Connor
    Level 1 (23 points)
    Photos for Mac
    Jun 7, 2012 3:11 AM in response to Stephen Connor

    I just had to restart iTunes again.  I gave it a while but the HDD never awoke.  Even when I manually awoke the HDD (by accessing it via Finder) the AppleTV wouln't connect.  The second I restarted iTunes, all was well.

     

    Sorry, I'm still not running the script so can't give that information.

  • by aut0maticdan,

    aut0maticdan aut0maticdan Jun 7, 2012 4:31 AM in response to Stephen Connor
    Level 1 (45 points)
    Jun 7, 2012 4:31 AM in response to Stephen Connor

    yeah, bummer.  I had a restart over night even after updating and restarting itunes.  It was due to connections in a CLOSE_WAIT state.

     

    Thu Jun 07 06:18:59 -0400 2012 :: Number of HS connections: 97 (CLOSE_WAIT: 0)

    Thu Jun 07 06:19:04 -0400 2012 :: Number of HS connections: 97 (CLOSE_WAIT: 0)

    Thu Jun 07 06:19:09 -0400 2012 :: Number of HS connections: 100 (CLOSE_WAIT: 0)

    Thu Jun 07 06:19:14 -0400 2012 :: Number of HS connections: 101 (CLOSE_WAIT: 1)

    Thu Jun 07 06:19:19 -0400 2012 :: Number of HS connections: 102 (CLOSE_WAIT: 2)

    Thu Jun 07 06:19:24 -0400 2012 :: Number of HS connections: 103 (CLOSE_WAIT: 3)

    Thu Jun 07 06:19:29 -0400 2012 :: Number of HS connections: 104 (CLOSE_WAIT: 4)

    Thu Jun 07 06:19:34 -0400 2012 :: Number of HS connections: 105 (CLOSE_WAIT: 5)

    Home sharing is broken.  I am going to restart iTunes.

    iTunes restarted

    Thu Jun 07 06:20:50 -0400 2012 :: Number of HS connections: 0 (CLOSE_WAIT: 0)

    restarts: 1 :: last restart: Thu Jun 07 06:20:45 -0400 2012

    Home sharing is broken.  I am going to restart iTunes.

    iTunes restarted

    Thu Jun 07 06:22:05 -0400 2012 :: Number of HS connections: 0 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Thu Jun 07 06:22:00 -0400 2012

    Thu Jun 07 06:22:10 -0400 2012 :: Number of HS connections: 0 (CLOSE_WAIT: 0)

    restarts: 2 :: last restart: Thu Jun 07 06:22:00 -0400 2012

     

    After updating things did briefly look better.  The number of connctions alternated between 3 and 4 for a while, which is something I hadn't seen before.

     

    I'm going to submit another bug report to apple with what we discovered here.  For now, this script will manage the problem on macs.  If I get a chance, I'll look into a windows solution, but its tough for me since I don't have a windows machine (we have a few XP & 7 machines at work).

     

    EDIT:  windows users may want to try Davids8477's book/mp3 loop.  Hows that going David?

     

    Message was edited by: aut0maticdan

  • by Davids8477,

    Davids8477 Davids8477 Jun 7, 2012 4:41 AM in response to aut0maticdan
    Level 1 (69 points)
    Jun 7, 2012 4:41 AM in response to aut0maticdan

    Well the server has been quietly play songs to itself all night and the morning the clients connected almost instantly on 2 computers and one ATV - did not try the other ATVs, but when one connects they all seem to.

     

    Gonna stop the server playing today and see if the result is different.

  • by cendrizzi,

    cendrizzi cendrizzi Jun 7, 2012 6:59 AM in response to aut0maticdan
    Level 1 (0 points)
    Jun 7, 2012 6:59 AM in response to aut0maticdan

    aut0maticdan:

    Maybe mine is a fluke then (like before).

     

    I haven't had a single problem since the update and restart of itunes. Presently I have two established connections.

  • by aut0maticdan,

    aut0maticdan aut0maticdan Jun 7, 2012 7:20 AM in response to cendrizzi
    Level 1 (45 points)
    Jun 7, 2012 7:20 AM in response to cendrizzi

    Honestly, I'm not sure.  Since we can't look at the source code of iTunes and appletv, we are pretty much left observing its behavior.  I know I've had days go by without a problem.  Let's compare hardware and software.

     

    I am running an AppleTV 3 (preorder/first batch).  Model number MD199LL/A.  The software version is 5.0.2 (4250).  It is set to sleep after 30 minutes.

     

    The iTunes side is an i7 quad-core mac mini from this year running OSX Lion Server (10.7.4) w/promise 6-drive thunderbolt RAID hosting the library.   iTunes 10.6.1 (7).

     

    There is a Dell business-class switch connecting the two.  I have a current-gen Airport Extreme, but its not techincally involved.  Everything is hard-wired cat 5/6.

     

    For the most part everything I have is current-gen top of the line and up to date on software.  : /

  • by Davids8477,

    Davids8477 Davids8477 Jun 7, 2012 8:28 AM in response to Davids8477
    Level 1 (69 points)
    Jun 7, 2012 8:28 AM in response to Davids8477

    Well its been 4 hours and I have been able to connect easily each time I've tried - with no music playing on the server and not server Itunes restart.

  • by aut0maticdan,

    aut0maticdan aut0maticdan Jun 7, 2012 11:28 AM in response to aut0maticdan
    Level 1 (45 points)
    Jun 7, 2012 11:28 AM in response to aut0maticdan

    My iTunes is looking about the same as yesterday.  Going on a few restarts now.

     

    I submitted a detailed bug report, for your reference:

     

    Your tracking number for this issue is Bug ID# 11616884

  • by aut0maticdan,

    aut0maticdan aut0maticdan Jun 7, 2012 11:51 AM in response to aut0maticdan
    Level 1 (45 points)
    Jun 7, 2012 11:51 AM in response to aut0maticdan

    I see that you can't view my bug or comment/vote for it.  Apparently apple uses the volume of bug reports for a particular issue to determine the severity.  I'd recommend anyone interested in getthing this fixed to log a real bug report (not one of those basic support submitions).

     

    Here is what I wrote.  You can copy/paste most of it:

     

    07-Jun-2012 02:26 PM Daniel Wharton:

    Summary:

     

    If an AppleTV is connected to iTunes via Home Sharing and left idle, connections to TCP port 3689 on the iTunes side begin to build up between the AppleTV and home sharing.  Once the number of connections crosses 100, all new connections go to a CLOSE_WAIT state and home sharing begins to fail for any device or computer trying to connect.

     

    A restart of itunes or a logging out and logging in of Home sharing on the iTunes side resolves the issue.  Restarting the appleTV has no effect on the connections.

     

    Steps to Reproduce:

     

    Turn on home sharing on both iTunes and AppleTV.  Connect to the library and then leave idle.

     

    Expected Results:

     

    I would expect iTunes would release home sharing connections as necessary and all Home Sharing clients to have no problem connecting and accessing the iTunes library.

     

    Actual Results:

     

    ESTABLISHED connections will build up on the iTunes host from the apple TV on TCP port 3689.  Once the number of ESTABLISHED connections crosses 100, all new connections will go right to a CLOSE_WAIT state and no new clients can connect (you get a timeout).

     

    Regression:

     

    Notes:

     

    It does not seem that this problem is universal.  Some users do not exhibit this problem at all.  It does transcend Mac and Windows iTunes libraries. 

     

    We have quite a discussion going here:  https://discussions.apple.com/thread/3948888?start=105&tstart=0

     

    I wrote a Ruby script to monitor, debug and restart itunes when necessary.  You can find it here:  http://djw.s3.amazonaws.com/homesharing-keepalive.rb

     

    I recommend turning debug on.

     

    AppleTV model number MD199LL/A.  The software version is 5.0.2 (4250).  It happened in earlier versions as well.  It seems to have started in iTunes 10.6.1.

first Previous Page 8 of 15 last Next