Last post Jan 27, 2015 11:51 AM by Marcos W
Jan 26, 2015 08:14 AM|Marcos W|LINK
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.
Jan 26, 2015 09:20 AM|ignatandrei|LINK
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?
Jan 26, 2015 11:59 AM|Marcos W|LINK
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()
.DataSource = dt
.DataTextField = "vchNome"
.DataValueField = "EnteJuridico_ID"
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)
Jan 26, 2015 01:13 PM|Marcos W|LINK
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.
Jan 27, 2015 11:51 AM|Marcos W|LINK
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.