Intermittent '80004005' unspecified error [Answered]RSS

15 replies

Last post Sep 09, 2011 12:15 AM by qbernard

  • Intermittent '80004005' unspecified error

    Aug 17, 2011 04:09 PM|dave1357|LINK

    I have a classic ASP application running on IIS6. The application connects to data files that are stored as Access .mdb files.

    Every few days or so (or sometimes multiple times in a day), the site goes "down" in the sense that all pages that try to connect to the database return a “Microsoft JET Database Engine error '80004005' unspecified error” (the scripts break at the line of code that tries to open a connection to the .mdb file). Pages that do not need to connect to the database continue to work fine.

    I can clear the problem by restarting IIS on the server. Then things will run normally for a while, but sooner or later the problem happens again.

    The server event logs do not show anything unusual.

    The problem seems to happen more frequently at times the website is getting a lot of use though the times it breaks do not seem to necessarily be times of peak use, so it is hard to say.

    Any ideas as to what might be causing this or how I might investigate it?

    Thanks!

  • Re: Intermittent '80004005' unspecified error

    Aug 19, 2011 03:28 PM|dave1357|LINK

     Hi Jeff,

    Thanks -- yes, that page is a good start, but I have already gone through it with no luck. Most of what I have found on the web about the "JET Database Engine error '80004005' Unspecified error" addresses situations where it is a hard failure and not an intermittent one.

    I have always had pretty good luck with Access, but I am now thinking that I may just have too much traffic on this application for JET or the driver to handle reliably (see http://databases.aspfaq.com/database/what-are-the-limitations-of-ms-access.html, for example). I am looking into migrating to SQL Server. If you have any additional thoughts I welcome them! Thanks.

     

  • Re: Intermittent '80004005' unspecified error

    Aug 22, 2011 03:17 AM|Lloydz|LINK

    Hi,

    Please check the Access and Classic ASP part and follow the steps in the following blog post:

    Tips for Classic ASP developers on IIS7
    http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

    Hope this helps, thanks.

     

  • Re: Intermittent '80004005' unspecified error

    Aug 22, 2011 04:58 PM|dave1357|LINK

    Thanks but I'm on IIS 6 so am not sure this applies -- unless I'm missing something, which is possible.

  • Re: Intermittent '80004005' unspecified error

    Aug 23, 2011 01:33 AM|Lloydz|LINK

    Sorry, if it is IIS6, Jeff's link is more suitable for the case. Based on my experience, 80004005 is more like a permission issue, could you please check the following that quote from the aspfaq link again, including the linked articles:

    Again, IUSR_<machineName> must have read and write permissions not only on the MDB file, but also on the folder in which it resides, and in some cases the system %TEMP% folder. See Article #2154 and KB #315456 for more information. If you are trying to access a network drive, see Article #2168 for information on setting up IUSR_<machineName> to connect to an Access database via a UNC share. You should also check out Article #2142 for information on opening Access in the correct mode (e.g. adModeReadWrite). 
     
    There are certain situations where you will need to set up permissions for the IWAM_<machineName> user as well. Specifically, the C:\document and settings\%domainname%\IWAM_localmachine\local settings\temp folder. Thanks to Sylvain Paquin for pointing this out to us! 
     
    If you are not using anonymous access, but rather Windows Authentication, you want to be sure that all potential users are in a Windows group that has sufficient privileges on the folder on the web site where the MDB files resides. You might have to update individual permissions systematically if you are unable to do so via group membership. 
     
    If you are getting "unspecified error" then try running the IIS site in its own memory space or, if it is already doing so, returning it to the normal memory pool. Another possibility is the symptom described in KB #225042
     
    Finally, Access can produce the "unspecified error" message if you use reserved words anywhere in your SQL statement (see Article #2080 for a list of reserved words). 

    If this still not work, could you please check event viewer to see if can find any clues?

    Thanks.

  • Re: Intermittent '80004005' unspecified error

    Aug 24, 2011 09:55 PM|Lloydz|LINK

    Hi dave1357,

    Have you got your issue solved?

    Thanks.

     

  • Re: Intermittent '80004005' unspecified error

    Aug 24, 2011 10:34 PM|dave1357|LINK

    Still no resolution and the problem seems to be worse -- the site is getting more traffic and the error is happening several times a day, and when it happens we have to restart IIS to clear it.

    I have looked at the permissions several times and they look correct (and if they weren't, wouldn't I get this error every time and not just occasionally?). I need to check the part about running IIS in its own memory space vs. the memory pool, but this has not changed from when the problem was not occuring.

    The event viewer shows no problems -- you woudn't know the site is having any problems based on this. If there is any additional tracing I can activate, let me know.

    I have looked at MDAC version and OLEDB version and both seem up to date. The problem really seems related to traffic -- nothing else seems to have changed -- which is why I am thinking that maybe JET is just not up to it. It must have some limit and maybe this is what happens when you are up against it.

    Again, thanks ver y much for your input. I am happy to hear any suggestions.

  • Re: Intermittent '80004005' unspecified error

    Aug 24, 2011 11:44 PM|Lloydz|LINK

    Hi,

    According to documentations, if your MDAC version is 2.5 or higher, this should not be the issue described in KB #225042. Have you also checked whether you have used reserved keywords in your access dababase designing?

    Thanks.

     

  • Re: Intermittent '80004005' unspecified error

    Aug 24, 2011 11:48 PM|qbernard|LINK

    This one is tough - "intermittent", I recalled quite sometime ago there was a similar thread posting about this, you can google, and we tried quite a bit of troubleshooting but doubt it solve the issue.

    Even MS can't tell why this behavior, the challenge is that yes it is permission related, yet it can't be repro as and when, it only happen 'from time to time' without any pattern.

    In the end, I believe one of the suggestion is to ditch JET and go SQL express or some sort.

    Cheers,
    Bernard Cheah
  • Re: Intermittent '80004005' unspecified error

    Aug 25, 2011 12:40 AM|HCamper|LINK

    Hi,

    This is a "Stab in the Dark" for this issues.

    I recall fighting with database problems on Windows XP Pro X64 

    problems were with the Microsoft XML Libraries being tied to MDAC libraries.

    This is a list of MS XML Versions http://support.microsoft.com/kb/269238 and

    links for installers and security updates.

    Check the Windows Update section of Control panel for installed versions against the list.

    You might download the current version installers and run them.

    You might try registering the xml dlls again in the system folders.

    Just a suggestion.

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Intermittent '80004005' unspecified error

    Sep 02, 2011 03:30 PM|dave1357|LINK

    An update: an IT guy enabled verbose mode on some sort of application-level tracing (sorry, but I don't know the details) and these error logs gave me an idea of where the problem was originating (the logs were showing "Could not update; Currently locked" message on some scripts). Based on this, I changed the manner in which I was updating the database in some commonly used places.

    I had been making updates by opening a Recordset, changing the fields, then closing the Recordset. I changed this to simply writing a single SQL UPDATE statement and using the Execute method of the Connection object (see http://databases.aspfaq.com/database/when-should-i-use-createobject-to-create-my-recordset-objects.html for a discussion of this). Although the first method seems perfectly valid and works fine under light use, I wondered if it was contributing to locking contention that JET could not handle under the heavy use the site is currently seeing.

    Since I did this, I have not had a recurrence of the problem(!) -- and it had been happening 10+ times a day during the previous week.

    So.... I am guarded optimistic that I have a solution for now, though at some point I may migrate to SQL Server Express just to make things more robust.

    Thanks to everyone for their suggestions and help.

     

     

     

     


  • Re: Intermittent '80004005' unspecified error

    Sep 04, 2011 10:11 PM|qbernard|LINK

    Nice! I have seen even closing recordset each time having this issue.
    You should be fine for now.... anyway moving to a much more proper DB system is the long term solution.

    Cheers,
    Bernard Cheah
  • Re: Intermittent '80004005' unspecified error

    Sep 07, 2011 07:29 PM|teknalight|LINK

    I have had this problem in the past, exactly as you described.  The solution for my case is that the security/permissions were set for READ/WRITE/MODIFY for the I_USR user for the mdb file only.  Changing it to READ/WRITE/MODIFY for I_USR user for the entire folder fixed the problem.   For the queries to run on the Access database file, something needs to be written to the folder where the mdf file lives, and this was causing a problem as traffic increased to the script that used the mdb file.  Thus the I_USR user needs permission to write to the folder, not merely the .mdb file.

  • Re: Intermittent '80004005' unspecified error

    Sep 07, 2011 11:46 PM|qbernard|LINK

    I believed the folder permission is required for the .ldb (.mdb lock file) which is typically together with the mdb file.
    Cheers,
    Bernard Cheah
  • Re: Intermittent '80004005' unspecified error

    Sep 08, 2011 07:49 AM|dave1357|LINK

    Just to be clear (since lots of people suggested this might be permissions related): are you saying that you had a problem like mine, where all your pages worked fine most of the time but gave this error in high-load situations, and it turned out to be a permission problem? This seems odd to me -- I would like a permissions problem would make database accesses fail all the time, not intermittently.

  • Re: Intermittent '80004005' unspecified error

    Sep 09, 2011 12:15 AM|qbernard|LINK

    Ya. I think it is different than yours. His case should be error at once and not intermittent.
    Cheers,
    Bernard Cheah