very slow web service on live server

ethar1
ethar1 used Ask the Experts™
on
Dear all,
I developed web services on vs 2013 c#  , It works fine on my development environment , but when I deploy it live server it begin very very slow ...
And after 3 or 4 times of calling web services I got this message:
System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at WebServiceArabDictionary.Repository.GetWordList(String SearchWord, String UserDeviceKey, String UserDeviceKeyEncrypted, Int32 iFrom, Int32 iTo) in w:\xxxxxxxxxxxxxxx\Repository.asmx.cs:line 181

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Its the sql servet that fires the exception
Top Expert 2015
Commented:
You possibly have a ConnectionString in your application that is not valid on the server.

You might have use a local or test database during development, so the ConnectionString must be changed for the server.

If you use the same database for development and production, then the credentials might need to be set in a different way, or the security adjusted so that the web service can log into the database.

Author

Commented:
It works for a few times ( 10 or 15 )  then it stop.
Commented:
increase the  maxpoolsize property of the connection

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial