[Mono-bugs] [Bug 413439] New: Connection Pooling Don't Work Properly
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jul 30 19:14:48 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=413439
Summary: Connection Pooling Don't Work Properly
Product: Mono: Class Libraries
Version: 1.9
Platform: i386
OS/Version: Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: Sys.Data.SqlClient
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: cristians at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Hi,
I was testing connection pooling parameters and when I set Min Pool Size=X, the
webserver return the following error:
System.Threading.ThreadAbortException: Thread was being aborted
at Mono.Data.Tds.Protocol.Tds70.Reset () [0x00000]
at Mono.Data.Tds.Protocol.TdsConnectionPool.GetConnection () [0x00000]
at System.Data.SqlClient.SqlConnection.Open () [0x00000]
at _Default.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
Also when you refresh the page it's returns:
System.Net.Sockets.SocketException: The socket has been shut down
at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32
size, SocketFlags flags) [0x00000]
at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32
offset, Int32 size) [0x00000]
I checked the connections on the server and see that the number of connections
configured on the Min Pool Size parameter are opened.
I was using as testing plataforms: CentoOS5 and OpenSuse VmWare Appliance
Web.conf file:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="SqlConnectionString" connectionString="Data
Source=161.196.180.80;Initial Catalog=ccambios;User
ID=sa;Password=c5141f;Pooling=true;Min Pool Size=5;Max Pool Size=15;"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.DirectoryServices,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<clear/>
<add connectionStringName="SqlConnectionString"
applicationName="/" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" name="DefaultMembershipProvider"
type="System.Web.Security.SqlMembershipProvider,System.Web,Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="true"
cookieName=".MYCOOKIE" defaultProvider="DefaultRoleProvider">
<providers>
<clear/>
<add connectionStringName="SqlConnectionString"
applicationName="/" name="DefaultRoleProvider"
type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
<customErrors mode="Off"/>
</system.web>
</configuration>
Default.aspx.cs file:
using System;
using System.Data;
using System.Data.Common;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ConnectionStringSettings connString =
ConfigurationManager.ConnectionStrings["SqlConnectionString"];
DbConnection connection;
DbProviderFactory factory =
DbProviderFactories.GetFactory("System.Data.SqlClient");
try
{
connection = factory.CreateConnection();
connection.ConnectionString = connString.ConnectionString;
connection.Open();
Response.Write(connection.State.ToString());
}
catch (Exception ex)
{
throw new Exception("Unable to open SQL connection for the SQL
Membership Provider.", ex);
}
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list