Skip to main content
Known Participant
February 6, 2011
Question

ODBC Server lock database and site goes in timeout

  • February 6, 2011
  • 4 replies
  • 4657 views

My configuration:

Coldfusion Enterprise 9.0.1 32 bit on Windows Server 2008 Web Edition 64 bit, 4Gb Ram, 2 Xeon processors

The sites using Microsoft Access Database, randomlly, go in timeout. This is due to the fact that "ODBC Server" lock the database (in the db folder there are the .ldb file). If I restart the "ODBC Server" service, the database is released and the site works. Do you have any idea how to resolve this issue?

This topic has been closed for replies.

4 replies

March 12, 2015

If you are using the timeout="XXX" argument in CFQUERY statements you may be conflicting with the timeout value set in your connection.  With a 64 bit OS it seems that the value you enter in the Advanced Settings section for each Access Datasource is used by the ODBC Server Service.

Participating Frequently
February 23, 2011

I've been dealing with CF locking .mdb files since CF5.

The two things that I have used successfully:

1. in the CFadmin, unchecked "maintain connections across request" (that handled most issues for me)

2. you can run a bogus query as well (ie the die page)

These methods work in CF5 and 7

In CF9, I only have to use the "maintain connection" option.

-------

I would be a little concerned if there is a lock causing a timeout.

I only had to break locks to re-load an MDB file from a client.

When the file was locked via CF, I could still query against it thru CF with no timeouts,

Hope that helps

Legend
February 6, 2011

Hello,

I do not use ACCESS very much however I have noticed particularly on CF9 (ie not noticed on CF8 CF7) sometimes the ACCESS datasource configured using the "Microsoft Access with Unicode” will stop being able to verify. When this happens the log ColdFusion9\runtime\logs\coldfusion-out.log show the following details:

SQLException while attempting to connect: com.inzoom.adojni.ComException: Cannot open database ''.  It may not be a database that your application recognizes, or the file may be corrupt. in Microsoft JET Database Engine code=0 Type=1.

Cannot open database ''.  It may not be a database that your application recognizes, or the file may be corrupt.

I do not normally us ACCESS in production so have not dug to deep in to why the problem is occurring.

Do you get any details in “coldfusion-out.log” when the database stops responding? How do you temporarily overcome the problem for now, restart CF ODBC services? When CF has stopped talking the ACCESS datasource does the ODBCAD32 panel still verify OK?

HTH, Carl.

hextraAuthor
Known Participant
February 7, 2011

The log file is:

02/06 09:08:15 Error [jrpp-1210] - File not found: /csv/_foto_pup.cfm The specific sequence of files included or processed is: C:\HostingSpaces\andrea.guarda\associazioni.csv.vda.it\wwwroot\csv\_foto_pup.cfm''

02/06 09:15:42 Error [jrpp-1210] - File not found: /csv/index.cfm The specific sequence of files included or processed is: C:\HostingSpaces\andrea.guarda\associazioni.csv.vda.it\wwwroot\csv\index.cfm''

02/06 09:16:30 Information [jrpp-1207] - Generating rss FEED

02/06 09:16:30 Information [jrpp-1207] - FEED generation completed {Time taken=16 ms}

Exception thrown by error-handling template:

coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Metrics service is not available.

at coldfusion.server.ServiceFactory.getMetricsService(ServiceFactory.java:159)

at coldfusion.filter.ExceptionFilter.handleException(ExceptionFilter.java:139)

at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:84)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

at coldfusion.CfmServlet.service(CfmServlet.java:200)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

06/02 09:20:15 error ROOT CAUSE:

coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: CFQUERY

at coldfusion.runtime.CfJspPage.checkRequestTimeout(CfJspPage.java:2907)

at coldfusion.tagext.sql.QueryTag.setupCachedQuery(QueryTag.java:799)

at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:586)

at cfindex2ecfm1283733899._factor3(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:86)

at cfindex2ecfm1283733899._factor6(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at cfindex2ecfm1283733899._factor7(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at cfindex2ecfm1283733899.runPage(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)

at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)

at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)

at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)

at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)

at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

at coldfusion.CfmServlet.service(CfmServlet.java:200)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

javax.servlet.ServletException: ROOT CAUSE:

coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: CFQUERY

at coldfusion.runtime.CfJspPage.checkRequestTimeout(CfJspPage.java:2907)

at coldfusion.tagext.sql.QueryTag.setupCachedQuery(QueryTag.java:799)

at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:586)

at cfindex2ecfm1283733899._factor3(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:86)

at cfindex2ecfm1283733899._factor6(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at cfindex2ecfm1283733899._factor7(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at cfindex2ecfm1283733899.runPage(C:\HostingSpaces\andrea.guarda\rusticart.it\wwwroot\arredamento\index.cfm:1)

at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)

at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)

at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)

at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)

at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)

> How do you temporarily overcome the problem for now, restart CF ODBC services?

Yes, i have enabled the server monitor with timeout alerts configured, when i recieve a mail, i restart the ODBC server and all works fine for 4-5 days.

>When CF has stopped talking the ACCESS datasource does the ODBCAD32 panel still verify OK?

Yes odbcad32 works fine. In the server the version of microsoft Access Driver is 14.00.4670 (Office 2010), this can be a problem?

BKBK
Community Expert
Community Expert
February 8, 2011

It could be that a query is taking to long, or that Coldfusion gets into a loop it can't escape. Put the content of pages that have queries inside try-catch. (If there are too many pages, do so on the first such pages that ColdFusion processes). Inside the cfcatch, run <cfdump var="#cfcatch#">

The following might even be a better alternative. Place the following tag in your application file:

<cferror template = "errorFile.cfm" type = "exception"  exception = "any">

Create the file errorFile,cfm. In that file, run <cfdump var="#error#">

Community Expert
February 6, 2011

CF normally locks Access databases, so this is not the cause of your problem. While restarting the service may fix the problem, it's not because of locking but rather some other problem with the service or with CF, and your Access databases.

You might try using the "Microsoft Access with Unicode" datasource type, which doesn't rely on ODBC at all. It has its own problems, but those problems may not affect you.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Dave Watts, Eidolon LLC