0

データベースへの負荷が大きすぎたり、データのかさばりが原因で、送信タイムアウト エラーが頻繁に発生します。wcf リクエストへの返信の送信に 3 分かかる場合は、タイムアウトを 3 分以上に設定するだけで十分です。

しかし、それはまた、ポート 80 が 3 分間ビジー状態になり、現在の応答が終了するまで他の応答を送信しないことを意味するのでしょうか?

その場合は、WCF を最適化し、インデックスを再構築する必要があります。また、おそらくサーバーのハードウェアをいくつかアップグレードする必要があります。

4

1 に答える 1

0

Yes, the WCF threading system does have a specific number of concurrent threads/processes it can handle based on your service throttling configuration and instance mode. It does not block port 80 for a single request so it will not hamper that; however, if you have a lot of simultaneous users, it could bog down the system if they are all running long service operation calls and using all your threads.

You should still take a look at optimizing your service/db. What are your normal clients using it for? If it is web, then obviously 3 mins is way too long to wait. At least I know I would be gone if something took that long!

As the phrase goes, there are many ways to skin a cat and without knowing your full system it would be hard to pick the single one to use, so here are some options (throwing more hardware at it should be last resort):

From a DB perspective, if getting the data is taking a long time, maybe you should look at possibly de-normalizing/pre-crunching the data to make it easier to retrieve.

From a service perspective there are ways to at least give control back to client so it can continue processing while waiting for the service operation to complete.

  1. Use duplex calling with callbacks to client when finished
  2. Use one way requests with an Id, with a manual client 'check for complete'
  3. Use MSMQ to process and keep results for client to check when complete
于 2013-02-28T04:49:23.407 に答える