Bug #8390 MySQL hangs with state as Reading from net
Submitted: 9 Feb 2005 11:17 Modified: 19 Dec 2007 8:46
Reporter: karuneesh bagga Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51 OS:Any (2003)
Assigned to: CPU Architecture:Any

[9 Feb 2005 11:17] karuneesh bagga
Description:
MySql server hangs after some time. The process list of Mysql has some connections with unauthenticated user and the state of it as Reading from net.

Can any body help me with what makes MySQL behave in this manner and what is the solution to it.

How to repeat:
The bug mentioned above is very erratic in nature
[9 Feb 2005 17:49] Jorge del Conde
Hi

Can you please send me a test case that reproduces this behaviour ?  Also, what version of mysql are you talking about ?  .. or did you mean MyODBC ?
[10 Feb 2005 12:10] karuneesh bagga
MyODBC version is 3.51.06, Platform is Windows 2003 server, Application server is IIS6 and Application is developed in .net C#. 
Please note that the application has been working fine since last 3 months. But recently the problem of "Too many connection with unauthenticated user " has started coming up. The MySQL hangs up and When we see the Process List of MySQL we can too many connection with unauthenticated user having status as "Reading from net". WHen we kill the IIS process and Restart IIS everything resumes to normal and we can access the portal normally. Its seems there is some Deadlock by some connection and from than onwards the "Unauthenticated connections" keeps on piling up. This is the info i can provide.

Kindly respond and suggest some solution. Its very important for me.
[10 Feb 2005 12:17] karuneesh bagga
MySQL version is 3.23.49-nt
[11 Mar 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[12 Mar 2005 0:05] Jorge del Conde
Hi

I tried reproducing this behaviour and was unable to do so.  Unless you can provide us with a test case that shows this bug, there isn't much we can do :(

If you need one of our engineers to examine your architecture and suggest a workaround, i strongly suggest you aquire a mysql support licence from http://www.mysql.com/support/
[14 Apr 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Apr 2005 20:52] Nicolas Moldavsky
I am experiencing the same problem on 4.1.11 Linux x86/SMP.   I am using the 4.1 C API linked statically and connecting from remote hosts.  I added an alarm() call in my client call to timeout if it cannot connect to the MySQL server in less than N seconds.  When the client times out the server continues listing the process slot as:

| 280 | unauthenticated user | xxx:32886 |         | Connect |      | Reading from net                 |                                                      |
| 281 | unauthenticated user | xxx:32891 |         | Connect |      | Reading from net                 |                                                      |
| 283 | unauthenticated user | xxx:33149 |         | Connect |      | Reading from net                 |                                                      |
| 284 | unauthenticated user | xxx:33153 |         | Connect |      | Reading from net                 |                                                      |
| 285 | unauthenticated user | xxx:33163 |         | Connect |      | Reading from net                 |
[27 Apr 2005 20:59] MySQL Verification Team
Mr. Nicolas,

Could you please provide your test case with C API for I will test ?

Thanks in advance.
[27 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[16 Sep 2007 18:51] Momchil Ivanov
same here mysql-5.0.37 on 64 bit gentoo hangs with "Reading from net". same database, same work load, but 32 bit gentoo -> no hangs. btw when I restarted the web server (apache) from where the connections come from (when the hang happens), all threads are in "Connec login" state.
[19 Sep 2007 22:52] Momchil Ivanov
"skip-name-resolve" seems to solve my problem, so hang seems to be related to dns lookups
[1 Oct 2007 13:52] Susanne Ebrecht
Hi Momchil,

to verify this behaviour, we need some more information. Are you really using ODBC ? Or do you use another connector?
I don't understand your last comment. Do you have the opinion, it is still a MySQL bug or is it a network bug of your system?

Regards,

Susanne
[1 Oct 2007 17:10] Momchil Ivanov
SORRY,
I definitely missed that part with the ODBC connector,
we are using myisam tables and the connections are coming from apache+php. The problem seemed like the one decribed here, but while reading I have missed that this bug report is for the ODBC connector. Anyway what I saw was the same behvior and disabling the resover fixed the problem.
But I saw was 2 machines under the same load (I just moved the database between the 2 mysql servers, and one was hanging when there were lots of clients , about 500 simultaneous connections from 1 host only, all the three servers ( 2 mysql, 1 web) were in the same network).
I have never had this problem, even with more loaded servers. But this database and the load on this machine just hangs the mysql server with processors being idle...

I cannot say that it is not a network bug, but I cannot say that it is either. Disabling resoving in mysql helps on this server especially. I was given this tip from people who have experienced similar behaviour. I haven`t looked at the code doing the dns lookups in mysql (might be gentoo related too) and I didn`t have the opportunity to try putting a line in /etc/hosts in that gentoo, to override dns lookups. Unfortunately this server is now in production and I cannot do furhter test. When I have the chance I might log the queries, copy the database and then try to simulate the workload on another machine. But I don`t have the resources now.
[2 Nov 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[7 Nov 2007 15:43] Susanne Ebrecht
Hi Momchil,

many thanks for your feedback.

Regards,

Susanne
[19 Dec 2007 8:46] Tonci Grgin
After reviewing this case it is my opinion that it has nothing to do with MyODBC. Being that reporter is unable to do further testing on affected server I'm forced to close this report as it does not appear to be a bug in MySQL SW.