[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


           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: ---


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 
                <add name="SqlConnectionString" connectionString="Data
Source=;Initial Catalog=ccambios;User
ID=sa;Password=c5141f;Pooling=true;Min Pool Size=5;Max Pool Size=15;"
            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">
                                <add assembly="System.DirectoryServices,
Version=, Culture=neutral,
            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" />
                <membership defaultProvider="DefaultMembershipProvider">
                                <add connectionStringName="SqlConnectionString"
applicationName="/" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" name="DefaultMembershipProvider"
                <roleManager enabled="true" cacheRolesInCookie="true"
cookieName=".MYCOOKIE" defaultProvider="DefaultRoleProvider">
                                <add connectionStringName="SqlConnectionString"
applicationName="/" name="DefaultRoleProvider"
                <customErrors mode="Off"/>

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 =

        DbConnection connection;
        DbProviderFactory factory =

            connection = factory.CreateConnection();
            connection.ConnectionString = connString.ConnectionString;
        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