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 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"
.DataBind()
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
cmd.Parameters.Add(param)
Next
con.Open()
dtReader = cmd.ExecuteReader()
returnDt.Load(dtReader)
logData(returnDt, list, con.ConnectionString, cmd.CommandText)
End Using
End Using
Return returnDt
End Function
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.
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:
None
0 Points
4 Posts
Strange behavior of a Vb.net application under Stress
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.
Grateful now.
stress vb.net Connection sql2008 pool
All-Star
120166 Points
27994 Posts
Moderator
MVP
Re: Strange behavior of a Vb.net application under Stress
Jan 26, 2015 09:20 AM|ignatandrei|LINK
How do you know? What is the code?
None
0 Points
4 Posts
Re: Strange behavior of a Vb.net application under Stress
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.
None
0 Points
4 Posts
Re: Strange behavior of a Vb.net application under Stress
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.
None
0 Points
4 Posts
Re: Strange behavior of a Vb.net application under Stress
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:
http://blogs.iis.net/bills/archive/2006/10/18/loadUserProfile-and-IIS7-_2D00_-understanding-temporary-directory-failures.aspx
http://blogs.msdn.com/b/vijaysk/archive/2009/03/08/iis-7-tip-3-you-can-now-load-the-user-profile-of-the-application-pool-identity.aspx
Hope help someone else with this post.
Thanks.