Search code examples
c#asp.net-mvcwcfiiswindows-server-2012

Webservice more load request to be optimized


I am using a WCF web service (C#) which needs to send an email and gives the response whether it is a success or failure.

Now due to more users giving bulk email requests from multiple applications and pointing to the same web service and due to the multiple requests at the same time, its throwing timeout exception and also its taking CPU Performance to the peak value.

So I am planning to make it asynchronous request to send an email by sending status in a notification using webhooks.

Also I am planning to have different URL for each application instead of pointing to the same one and so that it will create multiple web request and we can avoid the bulk request.

Please suggest the best solution for me to go forward.


Solution

  • i guess you didn't change the maxconnection in your web config. by default its 2. just add this to your web config on <system.net> section and your problem will solve:

    <connectionManagement>
        <add address="*" maxconnection="1000"/>
    </connectionManagement>