Solved

asp.net app with access DB hanging because of lock file

Posted on 2009-04-06
8
261 Views
Last Modified: 2012-05-06
I've made a small asp.net app that is using access for the data. While developing on my home computer everything worked fine. I've moved it over to a company server and it was working fine for about a day and now we're having issues.
It started out by some pages not displaying some pages and the progress bar just moving very slow and then just not showing up at all. We discovered that the access lock file seems to be sticking (just staying there). I can see on my computer that when I access a page the lock file appears for a second and then disapears. On the company server, if I'm the only one that opens the web page, I can see that the lock file appears and goes away as I navigate through the pages, but, seemingly randomly, at some point the lock file does not go away.
I also have noticed that when no one is using the web pages, if I try to compact the DB, it creates a db1.mdb file, but, it doesn't go away.
Any clues as to what might be happening?
thanks for looking and your suggestions
alan
0
Comment
Question by:avoorheis
  • 6
  • 2
8 Comments
 

Author Comment

by:avoorheis
ID: 24084034
btw,
I don't understand why the locking file would prevent the web file from displaying, as far as I know, the locking file does not prevent access to the data, just should prevent someone else from writing to a record that is locked (meaning someone else is trying to write to/update a record), right?
0
 

Author Comment

by:avoorheis
ID: 24084043
One other thing I'm noticing is that if the lock file starts sticking, staying there, it stays for about 10 - 15 min after closing the web page and then magically disapears.
0
 
LVL 28

Expert Comment

by:sybe
ID: 24085692
The lockfile appears when you have an open connection. Maybe your code forgets to close the connection in some files?
0
 

Author Comment

by:avoorheis
ID: 24087369
I don't see how. The app always closes it on my home computer and doing the exact same navigation works sometimes on the work server, but, sometimes stays locked, doing the exact same navigation.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 28

Accepted Solution

by:
sybe earned 500 total points
ID: 24087624
Maybe the connections are being cleaned by the Garbage Collector, and the Garbage Collector on your home machine might be activated more frequently than ther Garbage collector on the sever (because that server might have a lot more important things to do).
0
 

Author Comment

by:avoorheis
ID: 24090790
I don't know what the garbage collector is (this is my first web application), but, would it be able to break the connection (the lock file stays after I close the browser and I can't delete the lock file).

Also, I'm using the accessdatasource objects which all look similar to (except for the query string):

        <asp:AccessDataSource ID="AccessDataSourceCommentCount" runat="server"
            DataFile="~/App_Data/HMDistProfile.mdb"
            SelectCommand="SELECT [AccountNo], [CountOfAccountNo] FROM [qryCommentsCount] WHERE ([AccountNo] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="99032660792!^13[&amp;Joh"
                    Name="AccountNo" QueryStringField="AccountNo" Type="String" />
            </SelectParameters>
        </asp:AccessDataSource>
0
 

Author Comment

by:avoorheis
ID: 24093893
maybe it's not really related to the lock file, although, it's very strange to me that when compacting the database it keeps the temp file (db1.mdb) and the original file is not actually compacted.
So, what is happening, after a little more testing, is that the webpages seem to start up ok and the first few pages seem to be working ok. You can navigate back and forth, no problem. Then there is one other page that seems to be causing the problem. When navigating to it, it loads very slow...we thought it was stuck, but, I left it there and eventually it loaded....but, while it loading, no one else can navigate to any of the pages.
0
 

Author Comment

by:avoorheis
ID: 24315870
Well, it started working correctly. Not sure why. The server is not under our control, but, apparently something was changed. Thanks for your input.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now