开发者

When is load for IIS7 too much?

At a customer of ours, candidates take tests with our software. If their test is finished, some calculations are done on the server. Now, sometimes, 200 candidates can end their test at the same time, so 200 calculations are done concurrent. The calculations all seem to go fine, but some calls to the IIS7 server get back a http error...

In Flex, this is the error:

code = "NetConnection.Call.Failed"
description = "HTTP: Status 200"
details = "http://servername/weborb.aspx"
level = "error"

Isn't Status 200 OK? So what's wrong here? Is it even a IIS7 problem? Of the 200 candidates 20 got this message. When restarting their test, everything worked well.

I have found this on the subject, but I wonder if this has anything to do with my problem (next week our customer will do some stresstests and I'll already asked them to test test if solution in this post works).

Some questions:

  • Can it be that IIS7 blocks certain http calls when load is to much?
  • How can you know that IIS7 blocked those calls because of too much load?
  • Is it possible to configure these things?

Technically, in the 开发者_如何学Cfuture I would like to queue the calculations, but for now, there isn't time nor budget for that.

Application: Flex, WebORB, ASP.NET, IIS7 en SQLSERVER2008. Server is Windows Server 2008.


This problem seems very familiar to me. We have a bunch of flex widgets which are connected to one server-side and sometimes it also returns "Netconnection.Call.Failed". For us, it seems that the IIS(and MSSql behind) cannot process all the requests in time, hence some of them are timed out. Try to check how much time each request/all requests take, then check your timeout setting.


There are plenty of things you can do to fine tune the performance of both your server and IIS.

To answer your questions:

A maximum concurrent connections limit (plus other settings) in IIS 7 can be configured by selecting your website in IIS Manager and selecting 'Advanced Settings' in the Actions Pane on the right. Though by default this is a number much higher than 200.

Looking in the IIS log files, specifically the return status codes can give you an indication of what went wrong. Equally the Windows event log should also tell you of any exceptions that have occurred.


I suggest you turn on load balancing between instances of IIS, or consider using nginx for load balancing.

also set the limit of 200 User higher. Since in IIS, each user connect to your application is count as 1 instance of user, at some point you will use up 200 user slot. This is the default setting and you can set it to much higher number.

Also set your time out to a higher number.

Also look at Comet if you trying to call consistent result like live data (stock, weather, chat, shoutbox)


Technically, in the future I would like to queue the calculations, but for now, there isn't time nor budget for that.

A queue isn't that hard to put together with a batch-processing script running off Windows' scheduled tasks. Just dump results into a SQL DB, or if you're really lazy, insert rows in SQL with a serialized array, then have them "come back" to see their results. "Please wait, your results are still processing."

It'd take you less time than waiting around on SO for a silver-bullet answer in my opinion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜