OutOfMemoryException - Managed Console hosted WCF [modified]
-
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[
-
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[
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.
-
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.
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)
-
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[
-
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[
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