Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-06
8
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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
 
LVL 28

Accepted Solution

by:
sybe earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

715 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