Problems in Connection pooling. Urgent

dotnet framework

    Next

  • 1. Per Thread CPU Usage
    Looking for API to get Per Thread CPU Usage in C#. I kno you can get total with PerformanceCounter _Total - bu I want per thread. I saw some indication you coul get it with WMI Trace Events, but not sure if this i best way. I want API call in application Thanks, Eric
  • 2. Memory usage drift
    Environment: Win Server 2003, :NET Framework 1.1, C# I have an application that polls on a web service method every time a timer event is raised. The method always returns an empty array of strings. I report a part of the code just clarify a little: public void OnTimedEvent(object source, ElapsedEventArgs e) { string s="UserName"; // jgpm is the web service reference // getOrders() takes a string as input and // returns an empty array of strings string[] tickets=jgpm.getOrders(s); } Every time this code is executed, causes the memory usage to increase of few KB. I have already tried forcing the call of GC by using System.GC.Collect() but it didn't work. Do you have any other suggestion? Thanks in advance

Problems in Connection pooling. Urgent

Postby Mithun Verma » Fri, 22 Aug 2003 18:50:10 GMT

his is a multi-part message in MIME format.


Hello All,

My windows application has a form that needs to display fresh data to the user at short intervals (say every 10 seconds). For this purpose, I have included a timer. On every timer tick, I perform the database related operations to display the result to the user.
Note: Multiple instances of my application will be running at the same time and hence the timer running in each instance and initiation database operations.

With this approach, I started receiving errors like: Connection timed out. The connection pool has reached its maximum size because every request to the database opened and closed a connection. I changed the approach to:
Creating a single connection for the entire form so that all operations use the same open connection. The connection is closed when the form closes.
Even then, I now get the following type of errors:

a) 8/11/2003 3:21:40 PM SqlUtility Execute Error: Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
TimeTic Calling sp_ProductionTestBackgroundTask at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\khyatis\work\projects\imd\imdom\misc\sqlutility.cs:line 595
8/11/2003 3:21:40 PM SC Status Start NSC Monitor Error: at OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line 608
at IMD.OM.SC.SCStatus.StartNSCMonitor(SqlConnection commonConnection) in d:\xyz\work\projects\scstatus.cs:line 564System.Data.SqlClient.SqlException: Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line 595

I need to get rid of the above problem.

Regards,
Mithun






<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face="Trebuchet MS" size=2>Hello All,<BR><BR>My windows application
has a form that needs to display fresh data to the user at short intervals (say
every 10 seconds). For this purpose, I have included a timer. On every timer
tick, I perform the database related operations to display the result to the
user. <BR>Note: Multiple instances of my application will be running at the same
time and hence the timer running in each instance and initiation database
operations.<BR><BR>With this approach, I started receiving errors like:
Connection timed out. The connection pool has reached its maximum size because
every request to the database opened and closed a connection. I changed the
approach to:<

Re: Problems in Connection pooling. Urgent

Postby Rex » Sun, 31 Aug 2003 21:21:29 GMT

his is a multi-part message in MIME format.


For faster application, you can try rewrite sql statement to Stored procedure.

"Mithun Verma" < XXXX@XXXXX.COM > # XXXX@XXXXX.COM ...
Hello All,

My windows application has a form that needs to display fresh data to the user at short intervals (say every 10 seconds). For this purpose, I have included a timer. On every timer tick, I perform the database related operations to display the result to the user.
Note: Multiple instances of my application will be running at the same time and hence the timer running in each instance and initiation database operations.

With this approach, I started receiving errors like: Connection timed out. The connection pool has reached its maximum size because every request to the database opened and closed a connection. I changed the approach to:
Creating a single connection for the entire form so that all operations use the same open connection. The connection is closed when the form closes.
Even then, I now get the following type of errors:

a) 8/11/2003 3:21:40 PM SqlUtility Execute Error: Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
TimeTic Calling sp_ProductionTestBackgroundTask at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\khyatis\work\projects\imd\imdom\misc\sqlutility.cs:line 595
8/11/2003 3:21:40 PM SC Status Start NSC Monitor Error: at OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line 608
at IMD.OM.SC.SCStatus.StartNSCMonitor(SqlConnection commonConnection) in d:\xyz\work\projects\scstatus.cs:line 564System.Data.SqlClient.SqlException: Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line 595

I need to get rid of the above problem.

Regards,
Mithun







!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//E>">< < < < < < < For faster application, you can try rewrite sql
statement to Stored procedur<.< &nbs<;<
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0p>">
< "Mithun Verma" &l<; href="mailto: XXXX@XXXXX.COM >"> XXXX@XXXXX.COM <m<>A>>
# XXXX@XXXXX.COM <.. < <><V>Hello All,>BR>>BR>My windows application
has a form

Similar Threads:

1.Problems in Connection pooling: Urgent

Hello All,

My windows application has a form that needs to display fresh data to the
user at short intervals (say every 10 seconds). For this purpose, I have
included a timer. On every timer tick, I perform the database related
operations to display the result to the user.
Note: Multiple instances of my application will be running at the same time
and hence the timer running in each instance and initiation database
operations.

With this approach, I started receiving errors like: Connection timed out.
The connection pool has reached its maximum size because every request to
the database opened and closed a connection. I changed the approach to:
Creating a single connection for the entire form so that all operations use
the same open connection. The connection is closed when the form closes.
Even then, I now get the following type of errors:

a) 8/11/2003 3:21:40 PM    SqlUtility   Execute   Error: Transaction
(Process ID 73) was deadlocked on lock resources with another process and
has been chosen as the deadlock victim. Rerun the transaction.
TimeTic Calling sp_ProductionTestBackgroundTask    at
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam,
SqlConnection cnnCommon) in
d:\khyatis\work\projects\imd\imdom\misc\sqlutility.cs:line 595
8/11/2003 3:21:40 PM    SC Status   Start NSC Monitor   Error:     at
OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam, SqlConnection
cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line 608
   at IMD.OM.SC.SCStatus.StartNSCMonitor(SqlConnection commonConnection) in
d:\xyz\work\projects\scstatus.cs:line 564System.Data.SqlClient.SqlException:
Transaction (Process ID 73) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction.
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at IMD.OM.Database.SqlUtility.Execute(SqlParameter& prmOutParam,
SqlConnection cnnCommon) in d:\xyz\work\projects\\misc\sqlutility.cs:line
595

I need to get rid of the above problem.

Regards,
Mithun







2.connection in connection pool with pooling=false

I'm finding that even when pooling=false, a connection remains in my
connection pool connected to my database (it seems to quite quickly timeout
though - say 30 seconds).

My connection string:

    Initial Catalog=Benji_UnitTest;Data Source=.;Integrated
Security=SSPI;Pooling=false



Using this setting, I would expect that a new connection be created
everytime, and that when the SqlConnection is close()'d (i.e., returned to
the "pool") that the underlying database connection would be closed.

I also tried setting ";Connection Lifetime=1" in order to get the connection
to close quickly (as a worksround); this didn't seem to affect any change.

Am I misunderstanding something?



Thanks,

j


3.Help Requried on Connection Pooling [Urgent]

Hi ,

i have a requriment where i need to perform connection pooling through 
c#.net code .My database is Sybase.
Can any one forward me link or suggest me on how to start to write code for 
this.

Regards
Mani.

4.urgent: connection pooling error

Hi all, I have a web service that opens a sqlconnection to the db and does 
some work. Just recently I have begun getting the following error on a 
frequent basis:

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.

I have verified that my web service is closing connections. Why is this 
happening? Can I increase the max pool size? How?

thanks,
Param


5.Connection problem with Oracle client and pooled connections

I am having a problem with my ASP.Net project using an Oracle database. The error I am receiving is below:

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.

This application has been deployed at many sites, using SQL Server and Oracle databases, and we have never seen this error before. I am 99% certain that our application is not leaking connections. The only major difference between this installation and others is that the Oracle database is running on a HPUX server. This error can occur within two clicks of restarting IIS, so the connection pool would be nowhere near full.

Does any body have any suggestions to diagnose what's happening?

Thanks,

Martin.


-- 
Martin Farrow

6. Leftover Connections in Connection Pool (connection leak)

7. Problems with Connection Pooling: Feedback urgently required

8. Connection pooling problem: Need feedback urgently



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 15 guest