Event Code 3005 sql exception RRS feed

  • Question

  • User-295064261 posted

    I have application (asp.net in vb) on server1 and database on server2.

    Users can write some data into db and get reports..After some time users cant write data into db for a minute or two...(or if i restart server everything works). I found log..

    In piece of code i set connection timeout because i need 2,3 minutes to generate report from db..

    im disposed my connection after generating report..

    I found some information where I can see that i need to set max pool size in connection string

    Can u help me ? THANKS

    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 6/1/2011 1:55:30 PM
    Event time (UTC): 6/1/2011 11:55:30 AM
    Event ID: b01e98dcc8614d83b361ee96b605b9d2
    Event sequence: 2487
    Event occurrence: 1
    Event detail code: 0
    Application information:
        Application domain: /LM/W3SVC/1/Root/ccman-1-129513853152770866
        Trust level: Full
        Application Virtual Path: /applicat
        Application Path: c:\inetpub\wwwroot\applicat\
        Machine name: SERVER1
    Process information:
        Process ID: 3320
        Process name: w3wp.exe
    Exception information:
        Exception type: SqlException
        Exception message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    Request information:
        Request URL: http://server1/applicat/ainterface/default.aspx?camp=Cam_Campaign&account=0123129391&korisnik=Miln unhandled exception has occurred.cJohn&kontakt=09941231&agent=Sam+John
        Request path: /applicat/ainterface/default.aspx
        User host address:
        Is authenticated: False
        Authentication Type:  
        Thread account name: NT AUTHORITY\NETWORK SERVICE
    Thread information:
        Thread ID: 8
        Thread account name: NT AUTHORITY\NETWORK SERVICE
        Is impersonating: False
        Stack trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at APP.ainterface.Page_Load(Object sender, EventArgs e) in C:\Users\test\Desktop\application\APP\APP\ainterface\Default.aspx.vb:line 39
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Wednesday, June 1, 2011 4:53 PM


All replies

  • User-1322853079 posted

    this is the way to set max pool size in conection string

    string connectionString = "Data Source=serverip;Initial Catalog=databasename;User ID=user;Password=pwd;max pool size=100";

    Wednesday, June 1, 2011 10:50 PM
  • User-457099533 posted

    Two thing on the DB side, may the number of records in table is high:

    1. Try to normalize the table

    2. Create a index on the table

    Friday, June 3, 2011 7:06 AM
  • User-1359474226 posted

    The error occurs when the execution time beyond Timeout Property. When you are trying to connect or access to a Database table which is having large volume of data, query execution time will be more. Try the two approach below.

    1. Connection Timeout for Connection. It could be solved by setting ConnectionTimeout property of Connection object in Connection String.
    2. Timeout for Data access, that is, Command Object. You can set CommandTimeout property to Command object. I recommend you set CommandTimeOut property to bigger value.

    Dim myCommand As New SqlCommand()    myCommand.CommandTimeout = 15



    Hope this helps

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 3, 2011 8:51 AM