I have problem. I send multiple request to IIS Web Service (written in c# and .net platform). Every call need about 20 sec to proces. When I send 350 request, I get only half responses, and half time outs:
The operation has timed out
What to change, to correct process all requests.
Related
Secure SOAP web service consumed with HttpWebRequest taking 30-40 seconds for the first request. Subsequent requests are fast (1-2 seconds).
Nothing wrong on the webservice side as it's responding within same time for all the
requests.
Log shows request takes time to reach to the web service and I am not sure what is causing this delay.
What can be the issue?
Could the web service requiring client certificate to authenticate be causing this delay?
I need help to understand where my time problem is. I have a winform/wpf application which communicate with a WCF service through a webapi 2 and a System.Net.Http.HttpClient.
Client => HttpClient => webapi => wcf service.
When I deploy this and run, it takes the first time very long time to get an answer back. But second time and more it is very fast.
If I don't run it for a while it sleeps again.
Why is it so slow in the beginning, what will I look at?
When first call WebApi will initzialize (IIS have to run Api, and by default ISS start api after first call). This take some time. And in IIS You have the default AppPool Idle Time-out (minutes) set to 20 minutes, so after 20 minutes app will go to sleep mode, and IIS have to wake up app.
WebApi why 1st call is slow?
Almost the same problem is with WCF
WCF why 1st call is slow?
So in Your app you have problem with slow 1st api call, and after this you have problem with slow 1st wcf call. You have doubled the slow.
I'm wondering to use SignalR in my web-application (c#, mvc).
Scenario: my users giving me input and I processing it and show them back the results.
This processing can be very long. How long? let's say 3 minutes (depending on netwok traffic, usage, ... - cannot be predicated).
Currently, I doing this process in AJAX request for long polling. While AJAX is running, I display on screen: "Please wait".
Now I added to this scenatio a new server limitation: Since I'm using CloudFlare, they are limiting me that each request must takes less then 100 seconds. Otherwise, they abort the request.
So, I'm though about this and decide to check the option to move into SignalR. Why? because SignalR can manage this long polling for me. And mostly use another approach (like sockets or other technics), which may avoid this 100 seconds server limitation.
I'm reading in SignalR website that they checking the client capabilities and decide with which technology to use.
My concern: Since CloudFlare is limiting request\response to 100 seconds, this can do problems to SignalR. Let's say the my client is client without any new web feature (like WebSocket or other). This could lead the SignalR to do long polling - which may failed.
Is possible to define SignalR to avoid long polling?
Or
How do you recommend to avoid this problematic case.
SignalR allows you to configure the maximum amount of time the server will keep a long polling request open.
By default, the SignalR server will close poll requests that have been open for 110 seconds without receiving messages. Of course, if a message is sent to a client before the 110 seconds is up, the poll request will be closed when the message is sent. In both scenarios, the SignalR client will repoll when the server closes the previous poll (otherwise it wouldn't be long polling I guess).
You can lower the default timeout of 110 seconds during your application startup using IConfigurationManager.ConnectionTimeout:
// Make long polling connections wait a maximum of 60 seconds for a
// response. When that time expires, trigger a timeout command and
// make the client reconnect.
GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(60);
http://www.asp.net/signalr/overview/signalr-20/hubs-api/handling-connection-lifetime-events#connectiontimeout
My loadbalancer is set to maximum time - 120 seconds.
However when I process big data, it takes more time than that and I get error 500 - Service is temporarily unavailable.
How can I handle this issue?
A simple way of doing this is offloading the long running job to a separate "job server" and returning a web page immediately.
The "job server" can update job status in the database when completed or with progress as the job runs, and your web clients can poll the web server using AJAX or during normal page loads, looking for jobs marked as completed in the database and displaying a link to the result.
That way, no web request will take very long time at all and the client can go on starting more jobs or go on navigating the site while the job runs, even if your jobs run for hours.
We have a web service that is called by a third party. Third party's rules are that the service must return a response within 10 seconds.
We log all of the processing time, from when we receive the request, to when the web method exits.
Our problem: our third party is telling us that we are taking over 10 seconds, but according to our logs, we are finished processing well within time limit.
I suspect that the third party is having a connectivity problem, and that the time is lost after we complete processing, but while the response is coming down the wire. Our in-application logging can't captuer that timing (that I know of) because our web method has already returned.
Is there any IIS logging feature that we could use capture the time spent returning the response?
The time-taken entry in your logs accounts for the time it takes for the client to send the acknowledgment back to the server or reset the connection.
http://blogs.msdn.com/b/mike/archive/2008/11/13/time-vs-time-taken-fields-in-iis-logging.aspx
You'll want to also make use of the win32-status to determine when there is an issue.