Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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#">
Copy link to clipboard
Copied
All web site contains try-catch "features"
Copy link to clipboard
Copied
I am thinking in line with Carl. I suspect ColdFusion is the one locking the database! That ColdFusion arbitrarily locks the Access database every now and then is a well known issue.
A search on the web reveals that possible solutions are:
1) Go to the Data Sources section in the Administrator. For the relevant Access database(s), click on the button to Show Advanced Settings. Uncheck the option to Maintain Connections. Save the changes.
2) Instead of getting ColdFusion to send you an email when the locking happens, get it to open a page die.cfm. In that CFM page, write a query from a non-existent table (in order to deliberately force an error)
<cftry>
<!--- choose a table name that doesn't exist! --->
<cfquery name="unlockmdb" datasource="your_DSN">
SELECT cutemeerkats
FROM whereverYouCanFindThem
</cfquery>
<cfcatch type="database">
</cfcatch>
</cftry>
Read more in evolt.org
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.