Rightthen

Rightthen

  • NA
  • 31
  • 14.1k

system out of memory while opening WCF Service

Feb 20 2018 10:29 AM
I am getting an error System out of memory through mscorlib.dll. when trying to open a wcf service. endpoint binding is 
  1. <netNamedPipeBinding>  
  2.         <binding name="NetNamedPipeBinding_Configuration_1"  
  3.                  closeTimeout="00:01:00"  
  4.                  openTimeout="00:01:00"  
  5.                  receiveTimeout="07:00:00"  
  6.                  sendTimeout="07:00:00"  
  7.                    
  8.                  maxBufferPoolSize="21474836"  
  9.                  maxBufferSize="21474836"  
  10.                  maxReceivedMessageSize="21474836"  
  11.                  maxConnections="21474836" >  
  12.           <readerQuotas  
  13.           maxDepth="1320"  
  14.           maxStringContentLength="2147483647"  
  15.           maxArrayLength="2147483647"  
  16.           maxBytesPerRead="2147483647"  
  17.           maxNameTableCharCount="2147483647" />   
  18.           binding>  
  19.       netNamedPipeBinding>  
was not using , just tried to increase the size of buffers. the same setting work for same service with other clients but in this client it is giving problems. always out of memory right at the time of opening. So i reduced the size from 2147483647 to 21474836 now it works. But why is it happening when it is not happening with other clients of the same service.
 
Here are few things which recently happened.
 
1. Adding this service as reference was giving problems in the same client. Giving error System cannot find the file specified. althout all files were there. So i repaired my vs 2017 community edition. and then was successful in referencing the service.
 
but then this problem started happening. while the same service with int.max buffer sizes work with other clients. This client is client to 5 services in total. is it because of aggregate of all services ?
 
I assume it has something to do with .Net collection sizes. but it is working with other clients.
 
Thanks Regards

Answers (2)