Unanswered Error when using appfabric

  • Monday, May 21, 2012 2:40 PM
     
     

    I'm using AppFabric for dataCaching to store data that are returned from database. One of my Stored Procedures returns a huge amount of data about 500,000 rows. When I try to store these data into the App Fabric caching I get the following exception.

    Failed to allocate a managed memory buffer of 134217728 bytes. The amount of available memory may be low.

    I have changed the maxBufferSize to 50MB. Is it large enough. Documentation from Microsoft lacks. No suggested values for the configuration of AppFabric. nothing.

    Anyone has any idea what's the problem?


    • Edited by pantonis Monday, May 21, 2012 2:41 PM
    •  

All Replies

  • Tuesday, May 29, 2012 11:28 AM
     
     

    Can you provide a stack trace for the said exception? I suspect the issue is that WCF needs 134MB to serialize your object and that kind of memory is unavailable, leading to an InsufficientMemoryException. How large is that object you're trying to serialize? Could you try serializing it in isolation and check the size of the serialized item?

  • Wednesday, June 06, 2012 7:17 AM
     
     

    Thanks,

    How can I check the size of the serialized item?

  • Wednesday, June 06, 2012 10:02 AM
     
     

    Cache uses NetDataContractSerializer for serializing user object by default. You can try serializing your object using this serializer to see what is the size of your serialized object.


    MSFT