We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • DropPhone DropPhone

    360 Posts

    Microsoft

    Moderator

    Re: Locking Up / Not Responding / 500 Error

    Mar 07, 2014 12:34 PM|DropPhone|LINK

    The 930MB limit is in Wincache....however, Wincache is still just a guest in PHP's process, which is just a guest of the OS.  I'm not sure whether this limit is imposed by PHP or by the OS, but either way, Wincache is making a call to alloc something big, and PHP is saying, "No."

    I just looked through the implementation of wincache_ucache_info, and if you supply a $key, then Wincache will only fetch that one element.  So you shouldn't be trying to alloc the whole array in that case.

    Looking at your code, if $key is null, it looks like the wincache_ucache_info() function will try to get the whole cache.  Is the code that's calling getTimeLeftInSeconds() and getAgeOfEntryInSeconds() guaranteeing that $key is non-null in all cases?  You might consider adding an assert that $key is non-null.  Otherwise you run the risk of unknowingly hitting this alloc failure.

    Thx!

        --E.