问题 Error when using appfabric

  • 2012年5月21日 14:40
     
     

    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?


    • 已编辑 pantonis 2012年5月21日 14:41
    •  

全部回复

  • 2012年5月29日 11:28
     
     

    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?

  • 2012年6月6日 7:17
     
     

    Thanks,

    How can I check the size of the serialized item?

  • 2012年6月6日 10:02
     
     

    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