Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. OutOfMemoryException - Managed Console hosted WCF [modified]

OutOfMemoryException - Managed Console hosted WCF [modified]

Scheduled Pinned Locked Moved WCF and WF
csharpwcfhelpdotnetvisual-studio
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1 Offline
    1eyhk1
    wrote on last edited by
    #1

    hello There's an InsufficientMemoryException which I failed to resolve - binding config as follows: <bindings> <wsDualHttpBinding> <binding name="MyBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="500000000" maxReceivedMessageSize="500000000" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="500000000" maxArrayLength="500000000" maxBytesPerRead="500000000" maxNameTableCharCount="500000000" /> </binding> </wsDualHttpBinding> </bindings> <services> <!-- This section is optional with the new configuration model introduced in .NET Framework 4. --> <service name="MyLib.MyService" behaviorConfiguration="MyBinding"> <host> <baseAddresses> <add baseAddress="http://localhost:12345/MyServiceWCF/MyService"/> </baseAddresses> </host> <endpoint address="MyService" binding="wsDualHttpBinding" bindingConfiguration="MyBinding" contract="MyLib.IMyService" /> ... And error message: Ex {"Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low."} System.Exception {System.InsufficientMemoryException} But as seen above, maxBufferPoolSize="500000000" > 67,108,864 (Also, maxBufferPoolSize = int32 = max 2,147,483,647 - that's 2GB, should be much more than required) - it's not making sense when allocated mem 67MB throws an exception when it's lower than configured limit. I'm baffled (and not sure what to do as Dual don't support Streaming) Help? Dual don't support streaming... (binding attrib "transferMode" don't apply)[^] Windows 2003 process memory limit (not hit, should not be the root cause)[^] WCF default Read Quota[

    L 1 3 Replies Last reply
    0
    • 1 1eyhk1

      hello There's an InsufficientMemoryException which I failed to resolve - binding config as follows: <bindings> <wsDualHttpBinding> <binding name="MyBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="500000000" maxReceivedMessageSize="500000000" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="500000000" maxArrayLength="500000000" maxBytesPerRead="500000000" maxNameTableCharCount="500000000" /> </binding> </wsDualHttpBinding> </bindings> <services> <!-- This section is optional with the new configuration model introduced in .NET Framework 4. --> <service name="MyLib.MyService" behaviorConfiguration="MyBinding"> <host> <baseAddresses> <add baseAddress="http://localhost:12345/MyServiceWCF/MyService"/> </baseAddresses> </host> <endpoint address="MyService" binding="wsDualHttpBinding" bindingConfiguration="MyBinding" contract="MyLib.IMyService" /> ... And error message: Ex {"Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low."} System.Exception {System.InsufficientMemoryException} But as seen above, maxBufferPoolSize="500000000" > 67,108,864 (Also, maxBufferPoolSize = int32 = max 2,147,483,647 - that's 2GB, should be much more than required) - it's not making sense when allocated mem 67MB throws an exception when it's lower than configured limit. I'm baffled (and not sure what to do as Dual don't support Streaming) Help? Dual don't support streaming... (binding attrib "transferMode" don't apply)[^] Windows 2003 process memory limit (not hit, should not be the root cause)[^] WCF default Read Quota[

      L Offline
      L Offline
      Ladislav Mrnka
      wrote on last edited by
      #2

      There is also MaxBufferSize property in binding which is by default 65KB. But in your case there is still possibility that you are simply out of memory. Sending such big messages in buffered mode is problematic.

      1 1 Reply Last reply
      0
      • L Ladislav Mrnka

        There is also MaxBufferSize property in binding which is by default 65KB. But in your case there is still possibility that you are simply out of memory. Sending such big messages in buffered mode is problematic.

        1 Offline
        1 Offline
        1eyhk1
        wrote on last edited by
        #3

        There's no MaxBufferSize for wsDualHttpBinding - it's for wsHttpBinding I've configured maxBufferPoolSize to Int32.MaxValue (2,147,483,647 - that's 2GB) I think our app max ~125MB (far below 2GB), I really have no clue what can be done with wsDualHttpBinding (we need dual for callback)

        1 Reply Last reply
        0
        • 1 1eyhk1

          hello There's an InsufficientMemoryException which I failed to resolve - binding config as follows: <bindings> <wsDualHttpBinding> <binding name="MyBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="500000000" maxReceivedMessageSize="500000000" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="500000000" maxArrayLength="500000000" maxBytesPerRead="500000000" maxNameTableCharCount="500000000" /> </binding> </wsDualHttpBinding> </bindings> <services> <!-- This section is optional with the new configuration model introduced in .NET Framework 4. --> <service name="MyLib.MyService" behaviorConfiguration="MyBinding"> <host> <baseAddresses> <add baseAddress="http://localhost:12345/MyServiceWCF/MyService"/> </baseAddresses> </host> <endpoint address="MyService" binding="wsDualHttpBinding" bindingConfiguration="MyBinding" contract="MyLib.IMyService" /> ... And error message: Ex {"Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low."} System.Exception {System.InsufficientMemoryException} But as seen above, maxBufferPoolSize="500000000" > 67,108,864 (Also, maxBufferPoolSize = int32 = max 2,147,483,647 - that's 2GB, should be much more than required) - it's not making sense when allocated mem 67MB throws an exception when it's lower than configured limit. I'm baffled (and not sure what to do as Dual don't support Streaming) Help? Dual don't support streaming... (binding attrib "transferMode" don't apply)[^] Windows 2003 process memory limit (not hit, should not be the root cause)[^] WCF default Read Quota[

          1 Offline
          1 Offline
          1eyhk1
          wrote on last edited by
          #4

          Guys any idea? thank you

          1 Reply Last reply
          0
          • 1 1eyhk1

            hello There's an InsufficientMemoryException which I failed to resolve - binding config as follows: <bindings> <wsDualHttpBinding> <binding name="MyBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="500000000" maxReceivedMessageSize="500000000" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="500000000" maxArrayLength="500000000" maxBytesPerRead="500000000" maxNameTableCharCount="500000000" /> </binding> </wsDualHttpBinding> </bindings> <services> <!-- This section is optional with the new configuration model introduced in .NET Framework 4. --> <service name="MyLib.MyService" behaviorConfiguration="MyBinding"> <host> <baseAddresses> <add baseAddress="http://localhost:12345/MyServiceWCF/MyService"/> </baseAddresses> </host> <endpoint address="MyService" binding="wsDualHttpBinding" bindingConfiguration="MyBinding" contract="MyLib.IMyService" /> ... And error message: Ex {"Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low."} System.Exception {System.InsufficientMemoryException} But as seen above, maxBufferPoolSize="500000000" > 67,108,864 (Also, maxBufferPoolSize = int32 = max 2,147,483,647 - that's 2GB, should be much more than required) - it's not making sense when allocated mem 67MB throws an exception when it's lower than configured limit. I'm baffled (and not sure what to do as Dual don't support Streaming) Help? Dual don't support streaming... (binding attrib "transferMode" don't apply)[^] Windows 2003 process memory limit (not hit, should not be the root cause)[^] WCF default Read Quota[

            1 Offline
            1 Offline
            1eyhk1
            wrote on last edited by
            #5

            hello Is WCF Message Chunking only avail for .NET 4 and not for wsDualHttpBinding? http://msdn.microsoft.com/en-us/library/aa717050.aspx[^] I got a feeling only way to get around this is to implementing chunking and session management yourself. Thanks

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups