Solved

very slow web service on live server

Posted on 2014-03-05
4
279 Views
Last Modified: 2014-03-05
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

0
Comment
Question by:ethar1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Melih SARICA
ID: 39905722
Its the sql servet that fires the exception
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 50 total points
ID: 39905743
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.
0
 

Author Comment

by:ethar1
ID: 39905750
It works for a few times ( 10 or 15 )  then it stop.
0
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 450 total points
ID: 39905764
increase the  maxpoolsize property of the connection
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question