Solved

java.io.EOFException: Can not read response from server.

Posted on 2011-03-03
11
2,259 Views
Last Modified: 2012-05-11
I've got CF 9 standard running on a Red Hat box with MySQL 5 & Apache.

When I first load my site, it immediately throws the following error: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost  When I refresh, everything works fine; I think once the SQL query is cached, thus giving a faster response, the page works, but when it has to do a fresh query, it times out.

I've been doing research on the error and have increased the net_read_timeout and net_write_timeout settings in MySQL to 30 seconds.... but the error happens almost immediately so I don't think it's MySQL.

It almost seems more like Coldfusion is simply not waiting long enough for a response from MySQL before closing the connection.

Any help is appreciated!!
0
Comment
Question by:MFredin
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 35033513

try loading a page that has no SQL interactions and see if the error occurs

You can create a simple dummy page that just says "Hello World"    test.cfm

You can also try a simple html page that does the same.  This will avoid the CF processor.  That will help narrow it down between Apache and Coldfusion and SQL.    test.html  =  Hello World

0
 

Author Comment

by:MFredin
ID: 35033563
Couldn't get it to break on the test.cfm and test.html pages you recommended in the last post.  

Here's a few other errors with it.

ErrorCode: 0
            Message: Communications link failure
            Last packet sent to the server was 0 ms ago.
            SQLState: 08S01
            StackTrace: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
            Last packet sent to the server was 0 ms ago

DataSource: MYDATA
      Detail: Communications link failure
      Last packet sent to the server was 0 ms ago.
      ErrorCode: 08S01
      Message: Error Executing Database Query
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
ID: 35033579
0
 

Author Comment

by:MFredin
ID: 35033597
Thanks brikeshchauhan,

Seems like the problems they talk about in the article would continuously cause problems, where the errors I get go away after one or two refreshes of the page.
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
ID: 35033619
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 11

Expert Comment

by:Brijesh Chauhan
ID: 35033627

>> Seems like the problems they talk about in the article would continuously cause problems, where the errors I get go away after one or two refreshes of the page.

Yes, basically WHY DOES it work on page refresh ? that would probably answer it... I just saw the error codes and thought may be something is in there which could help you...
0
 

Author Comment

by:MFredin
ID: 35033640
Thanks guys.  I changed "localhost" to my server name and it seems to have solved the problem.  I will come back after some testing time.
0
 

Author Comment

by:MFredin
ID: 35033728
I spoke too soon... same errors.  When I let the application sit for about 20 min and refresh, it triggers the error.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 35033948
(not for points ...)

Though the error's different, the sporadic nature of the problem sounds suspiciously like a mySQL issue that's been around for a loong while
http://stackoverflow.com/questions/4500414/coldfusion-9-mysql-communications-link-failure

A total shot in the dark, but is this relevant?
http://forums.mysql.com/read.php?39,277481,286736#msg-286736

0
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 35034084
sounds suspiciously like a mySQL issue that's been around for a loong while

Here's a more direct link to that discussion
http://forums.adobe.com/message/3396302#3396302
0
 

Author Comment

by:MFredin
ID: 35060451
Thanks _agx_ !  

I simply added "SELECT 1" in the connection string on my CF datasource and it's back on track.  
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now