Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major mixup in two ASP.NET transactions
Message
From
02/10/2006 11:50:39
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01150471
Message ID:
01158573
Views:
64
>Was this happening when the server wasn't receiving any hits other than your test page ?

Yes, this happens even if I am alone on the server. It can also happen even if I only fire one hit. It is random. The reason I was able to obtain more errors yesterday (18 hours of testing) was because I was launching an enormous amount of hits. Thus, the chances of obtaining more errors was more evident and that was allowing me to isolate more and more the situation. Basically, I fire over a quarter millions hits in about 4 hours.

1. I eliminated that this could be related to a bad index or something like that. I packed and reindexed (recreating the tags) on the related tables.

2. The errors will start happening as the SQL grows more and more. For example, if I only have SELECT Table.Field FROM Table, I can run the test over 50000 hits and I won't have the errors. If I add one INNER JOIN, I will start to have occasional errors. If I had more INNER JOINS, this is a total disaster.

3. I change the connection string to:

Provider=VFPOLEDB.1;Data Source="d:\iis\Direct Martial Arts\App_Data";Collating Sequence=general

This doesn't change anything.

4. I change the data management approach to use the oCommand instead of the oDataAdapter to collect the data and this gives the same result.

My SQL can be as simple as this.
<%@ Page Language="VB" AutoEventWireup="false" Inherits="Framework.Framework.WebForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim oCommand As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand
            Dim oConnection As System.Data.OleDb.OleDbConnection = _
             New System.Data.OleDb.OleDbConnection("Provider=VFPOLEDB.1;Data Source=""d:\iis\Direct Martial Arts\App_Data"";Collating Sequence=general")
            Dim oDataAdapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter
            Dim oDataSet As System.Data.DataSet = New System.Data.DataSet
            oCommand.Connection = oConnection
            oCommand.CommandText = "SELECT Video.Numero FROM Video " + _
             "INNER JOIN Masters ON Video.NoMaster=Masters.Numero"
            oDataAdapter.SelectCommand = oCommand
            oDataAdapter.Fill(oDataSet)
            Exit Sub
        End If
    End Sub
</script>
The only conclusion I could make is that either the OleDb .NET object or the VFP data provider is not reliable to go in production with intensive number of hits against a server. I would have switched to SQL Server if it wouldn't have been about the high cost licensing issue. But, I just can't afford that. I need to keep VFP as the backend. But, my question is, are there really some other people out there, having high traffic Web site using that VFPOLEDB.1 provider?

>I was wondering whether the oDataAdapter.Fill() would still close the connection when passed in this way - but it seems that it does so that's not a problem. If you're running this from a page instance it looks OK. I suppose you could test with a hard-coded connection string rather than obtaining it from oApp.

Yes, in my other approach, I was opening it manually and closing it manully. This gave the same result.

As you can see in my simplified code, since last night, I am using the connection string as is in the code.

So, basically, there cannot be any collision with other hits. As I moved this code in the page load, you can see that all the code is in here. The page is bound on the page class however. But, the only thing that this does is to call the BeginRequest() and EndRequest(). This shouldn't affect this code.

>Try adding a oDataAdapter.Dispose
>
>Maybe try the simple version:
>
>Dim lcSQL As String = theusual
>Dim oDataSet As DataSet = new DataSet
>Dim oDataAdapter as OledbDataAdapter = new OleDbDataAdapter(lcSQl,oProcess.oApp.aConnection(1))
>oDataAdapter.Fill(oDataSet)
>
I will try that and will let you know.

There could be something in regards to the application pool. But, if that would have been the case, I wouldn't have obtained that on the Windows Server 2000. I have that on three servers. So, it is not server related. I was not able to obtain that on my Windows XP Pro PC however. That is what I just can't understand. The new server is extremely fast. It is a brand new server installed Friday night. It is 3.2 Ghz dual core double CPUs. So, it is not a performance issue. We have a lot of RAM. So, that cannot be that as well.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform