0
votes

In the webAPI, when I fetch some records,sometimes it will occur the exception

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

But sometimes it's ok and response very fast.

Why I get the exception?

1

1 Answers

0
votes

If might be that the database is locking up. Perhaps you have started a transaction on a separate thread, or in a different app, and the current call cannot complete because the transaction has not been closed.

Try killing all applications that are talking to the database, and making sure that your code is not beginning any transactions that it is not closing.