Out of Memory error even with gcAllowVeryLargeObjects when serializing RRS feed

  • Question

  • I had encountered Out of Memory error when serializing and NewtonSoft Json object. I was able to remedy this to a good degree by setting gcAllowVeryLargeObjects = True in App.config. However in very few large records I still encounter this error when trying to serialize the Json object as following


    Application is complied in 64 bit (no prefer 32 bit)

    90% of Physical ram available

    I appreciate any input on this

    Sunday, July 28, 2019 11:40 PM

All replies

  • Hi gariani,

    Thank you for posting here.

    According to your description, you want to solve the exception that you got when serializing.

    The following link could be helpful for you.

    If it not useful for you, please provide the related code.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, July 29, 2019 6:35 AM
  • Just how large are your records?  It may be that JSON is not the right choice for you.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, July 29, 2019 11:15 PM