cold fusion and mysql error: I think?I posted this in a MySQL forum, but was told they thought it might be a Cold Fusion error instead.


Sometimes when I view my webpage, which has a search form on it and then search for records in my database, and I let it sit there for a few minutes and then refresh or hit the back button, it throws up an error saying:


"500 Internal Server Error: There is a problem with the resource you are looking for, and it cannot be displayed. "


"Error executing database query


communications link failure. Last packet sent to the server was 0ms ago"


"The error occurred in D:\inetpub\michael-sexton\rlb\search.cfm line 2:"


1: <!---get records for query--->


2: <cfquery name ="rsBulbs" datasource="rlbulbs">
3: SELECT item
4: FROM rlbBulbs


You will notice in the SELECT statement, its pulling items from rlbBulbs. The b in bulbs here is capitalized, but when I view my page code it is not capitalized. I have looked at my database and the table is rlbbulbs, no caps there either. I have made sure I put the current page to the remote server.

Also, when I do get the error, I can usually click back and click search again and it displays the records with no problem. Does anyone know whats going on? I cant have clients coming to my page and get errors every other time they try to do a new search. Thanks for any help.

Recommended Answers

All 26 Replies

I haven't a clue about that one. It could be a driver issue. There was one a while back with NPE's and mySQL. But this is probably something different. Only thing I can think of is to check the server logs. Maybe they show moredetails.

Is it a ColdFusion error? Or is that message being displayed with a white background? Could also be your web server crapping out. Check your web server logs and CF logs.

Arrgh, you mean my hosting companies server logs? That might be a problem since I am using some space on a friends account. Also, the error happens locally as well on my dev environment. Is there a way to check my local server logs?

Is it a ColdFusion error? Or is that message being displayed with a white background? Could also be your web server crapping out. Check your web server logs and CF logs.

Samaru, not sure. I think dont think its a white background and again since I'm using some temp space on a friends web account, I dont have control panel access so I dont think I could check the logs.

Is there a way to check my local server logs?

No, you almost certainly can't check the host's logs. But if it happens locally too, you can check your own logs, sure. On the default install there are logs in 2 places {cfinstall}\logs and {cfinstall}\runtime\logs. {cfinstall} being something like c:\coldfusion8\

Totally unrelated, but this forums styles for "quotes" are hard to read, not to mention distinguish from the rest of the response. Whatever happened to indenting people?? ;)

Hi Arrgh, I found this in the exception logs:

"Error","web-1","07/22/10","09:09:04",,"Error Executing Database Query.Could not create connection to database server. Attempted reconnect 3 times. Giving up. The specific sequence of files included or processed is: C:\ColdFusion9\wwwroot\rlb\search.cfm, line: 2 "
coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query.
	at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:595)
	at cfsearch2ecfm923716709.runPage(C:\ColdFusion9\wwwroot\rlb\search.cfm:2)
	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:363)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	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:53)
	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.http.WebService.invokeRunnable(WebService.java:172)
	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)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.Util.getInstance(Util.java:381)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2270)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:593)
	at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
	at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'rlb'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.Util.getInstance(Util.java:381)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:911)
	at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3953)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2198)
	... 12 more

Not sure exactly what it means other than I can see I am losing my connection to my database.

Ok I also added a <cfsetting requesttimeout= "20000"> to my search.cfm template. I'm now testing to see if this helps. I think I read this somewhere. lol SO far I have not been able to get the error after wating approxamately 20 minutes or so.

Ok I cant seem to get the error locally now, but just got it when browsing remotely. Here is the error log. Sorry for all the code, but I really need to get this issue resolved. Thanks for all the help!

Browser   Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPDTDF) 
Remote Address   74.124.178.176 
Referrer   http://michael-sexton.com/rlb/search.cfm 
Date/Time   04-Aug-10 07:39 AM 
 
Stack Trace (click to expand)  
at cfresults2ecfm559742496.runPage(D:\inetpub\michael-sexton\rlb\results.cfm:38) at cfresults2ecfm559742496.runPage(D:\inetpub\michael-sexton\rlb\results.cfm:38) 


com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
	at sun.reflect.GeneratedConstructorAccessor605.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
	at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
	at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:838)
	at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:348)
	at coldfusion.sql.Executive.executeQuery(Executive.java:1229)
	at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
	at coldfusion.sql.Executive.executeQuery(Executive.java:939)
	at coldfusion.sql.SqlImpl.execute(SqlImpl.java:341)
	at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:843)
	at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:533)
	at cfresults2ecfm559742496.runPage(D:\inetpub\michael-sexton\rlb\results.cfm:38)
	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:363)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
	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:53)
	at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
	at coldfusion.CfmServlet.service(CfmServlet.java:200)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at com.intergral.fusionreactor.filter.FusionReactorFilter.b(FusionReactorFilter.java:376)
	at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:254)
	at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:164)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	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)
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
	at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2455)
	at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906)
	... 52 more

>>> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'rlb'

The first one looks like a wrong database name. The others seem like some kind of network problem. Not sure if it's network or driver related. But google shows lots of threads on these two phrases.

1.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

2.
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

Hi arrgh, I dont know why database name would equal "rlb" the name should and in my code is "rlbulbs". Well I say I dont know...the truth is the original db was an Access db named rlb. When I switched over to MySQL, I renamed the database to rlbulbs and renamed the tables as well. Obviously I have corrected all instances of datasource names or my search.cfm would never run correctly. But this "timeout" issue seems to happen somewhat randomly. Thanks again for all your tremendous help!

Yes, that's why I'd sift through the google threads on those phrases. You're obviously not the 1st person to have the problem. So there might be an answer somewhere in them. That's what I always do when I have a weird problem I can't solve. Find similar threads and see if someone found a fix for it ;)

Yes, that's why I'd sift through the google threads on those phrases. You're obviously not the 1st person to have the problem. So there might be an answer somewhere in them. That's what I always do when I have a weird problem I can't solve. Find similar threads and see if someone found a fix for it ;)

Yes thats what I'm doing. Though many of the posts Im finding seem to have confusing resolutions. Also, since I cant talk to support with the hosting company, I am trying to migrate over to my hosting company, but of course nothing is ever simple as I am having some trouble there...lol I hate godaddy! Thanks again!

I hate godaddy!

From the many threads and blogs I've read .. you're not alone there.

well i did speak with a tech agent from the hosting company and he tried to get the error to show up on his end...I dont know if he finally did or not, he jus finally said he was creating a support incidence ticket for me and would refer it to others higher up the tech ladder. So waiting to hear back from them. Also arrgh, I went through several of the googled pages of this error as you suggested. I didnt find any specific to my case, or maybe I didnt understand any of them. Either way, once I am able to get this up and running on my site, then I can test to see if it happens there as well. Thanks again for all the help!

Sporadic errors are always the hardest to work through with any tech support dept. You should document it when it happens again (time, script, etc..) and definitely take a full screen shot!

Sporadic errors are always the hardest to work through with any tech support dept. You should document it when it happens again (time, script, etc..) and definitely take a full screen shot!

I will definately do all you suggested. I just got an email and they say they couldn't reproduce the error on their end and said it could be my code, but they alsao said somehting about maybe moving my database to another server. Of course not being the owner of this site I didnt think I should do that, nor do I think I actually could.

Yeah, I don't know about moving someone else's db without their permission. But more importantly, why did they suggest that and what issue did they think it would solve?

They said they had noticed some spikes in the server logs. NOt sure what all that means. They emailed me back and moved it supposedly and after I specifically said that might not be a good idea unless they were going to just move the two tables I created. I hope thats all they did. Anyway, I will test more tomorrow with the "new" server.

They said they had noticed some spikes in the server logs

Is that code for ".. we saw bunches of errors in the logs and realized it might not be your code at fault but our networks and/or hardware"? ;-)

lol yes I think you translated that well. I just now got the error again assumedly using the new server. Took 2 screenshots and pointed out the time on the error log and emailed to support. What a headache!

Ok well tech support sent me an email again last night around 1 and said they disabled "maintain connections with the Coldfusion Admin" and said the timeout appeared to be gone. I was testing this early this morning and it seemed to work fine. Then I started getting a new error about ormOptions not having a setting!. Sent them an email and they said a Coldfusion 9 upgrade was causing some issues and should have it resolved today. Thanks again arrgh for all your help. Just wanted to let you know what was going on. Have a good one!

Tony

Thanks for the updates. Glad to see things are progressing. I'm surprised about the cause though. The "maintain connections.." setting caused problems in CF8, though IIRC it caused a null pointer error or something. But thought they fixed that. Guess not!

My instructor in school uses this particular hosting company and always recommended them. Thats who let me put these files from work on his server, but the last few months...well I think with the release of CF9, they have been doing alot of updating and that has caused alot of problems. His sites, as well as some of the schools sites have been down quite a few times. Databases got moved or deleted mysteriously, files got moved as well. Anyway, seems to be working fine now. Going on 3 hours and no errors or timeouts! lol. Now godaddy is another story! Just canceled my service which I thought was a coldfusion plan. It wasnt. Now to find a new site that supports CF! Any recommendations?

No, but there's lots of threads about recommendations on both adobe's forums and www.houseoffusion.com

I would go with http://www.dailyrazor.com/ . Good (for what you pay anyways) hosting that supports CF with SQL Server/MySQL.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.