Strange behavior of a Vb.net application under Stress RRS feed

  • Question

  • User1461970823 posted

    I'm having a problem with a system that I maintain.
    I downloaded a program (http Rider) to stress my application and happens very strange behavior.
    In the macro  I make the login, click on one of the 4 modules, go into a search screen and do the search with the default filters.
    While this routine is running for 100 threads with 100 millisecond intervals, make the login on the system and go into another screen that has only one combo. This combo performs a simple procedure in Sql 2008 database with Ado.net (framework 3.5).
    I'm on this screen and I just refreshing the screen. Several times this combo receives data from one of the procedures involved in the routine of the stresser. It's random.
    I know that if I turn off the pool, by setting pooling to false in the connection string, this problem does not occur.
    I've used the Fill, already switched to dataReader and do not use shared methods.
    This behavior occurs when public in Release mode. In Debug mode we have no reports of this problem happen.
    I don't know how else to investigate.
    I have access to the system code.

    I hope I was clear in the scenario.
    Grateful now.

    Monday, January 26, 2015 8:14 AM


All replies

  • User197322208 posted

    Several times this combo receives data from one of the procedures involved in the routine of the stresser. It's random.

    How do you know? What is the code?

    Monday, January 26, 2015 9:20 AM
  • User1461970823 posted

    I know all the procedures involved in the process and i created a function that log the procedure and the dataTable columns in a text file.

    The code that fill the combo is really simple.
    This code is my attempt to use a dataReader, but the problem still happens.

    Dim dt As DataTable = ExecuteConnection()
    With cmbRestaurantes
      .DataSource = dt
      .DataTextField = "vchNome"
      .DataValueField = "EnteJuridico_ID"
    End With
    Private Function ExecuteConnection() As DataTable
            Dim list As New List(Of System.Data.SqlClient.SqlParameter)
            list.Add(New System.Data.SqlClient.SqlParameter("@Usuario_ID", CType(Session("ssObjUsuario"), BLL.bllUsuario).objSchema.Usuario_ID))
            list.Add(New System.Data.SqlClient.SqlParameter("@TipoEnteJuridico_ID", 1))
            list.Add(New System.Data.SqlClient.SqlParameter("@bitAtivo", DBNull.Value))
            list.Add(New System.Data.SqlClient.SqlParameter("@EnteJuridico_Id", DBNull.Value))
            Dim returnDt As New DataTable
            Dim dtReader As SqlDataReader = Nothing
            Using con As SqlConnection = New SqlConnection(Common.getSqlConnection())
                Using cmd As SqlCommand = New SqlCommand("P_SEL_RESTAURANTES_VINCULADOS", con)
                    cmd.CommandType = CommandType.StoredProcedure
                    For Each param As SqlParameter In list
                    dtReader = cmd.ExecuteReader()
                    logData(returnDt, list, con.ConnectionString, cmd.CommandText)
                End Using
            End Using
            Return returnDt
        End Function

    Monday, January 26, 2015 11:59 AM
  • User1461970823 posted

    For some reason, i publish the same application in another server and the issue did not happen.
    I'll investigate the difference between the two servers and post here if i found the reason.

    Monday, January 26, 2015 1:13 PM
  • User1461970823 posted

    So, i have found my solution. The problem wasn't in the code, but on IIS.
    I changed the loadUserProfile, inside pool configurations, to true and my ghost bug was solved.

    The reason and how to do this configuration can be found here:



    Hope help someone else with this post.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 27, 2015 11:51 AM