Bug #24744 Cannot connect to "Server Name" error 10055
Submitted: 1 Dec 2006 6:16 Modified: 5 Jan 2007 7:52
Reporter: Mahayogya Tech Support Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.12 OS:Windows (Win XP SP2)
Assigned to: CPU Architecture:Any

[1 Dec 2006 6:16] Mahayogya Tech Support
Description:
Our setup is

Windows 2003 Server
MySQL 4.0
MyODBC 3.51.05 (Our application is using this version) & MyODBC 3.51.12 (3.51.12 is being used by another application)

Client machines are
Windows XP SP2
MyODBC 3.51.05 (Our application is using this version) & MyODBC 3.51.12 (3.51.12 is being used by another application)
VB6 with ODBC application

60-65 clients are using at a time.

in the client occasionally the message "Cannot connect to <Server Name> error code 10055" is appearing.

when trying to reinstalling odbc drivers also not solving it.

Using system restore option of XP and chaning to a earlier date is working.

need a speedy reply guys

thanks in advance

How to repeat:
extactly don't know
[1 Dec 2006 11:11] Tonci Grgin
Hi and thanks for your problem report.

Error 10055: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. The online documentation indicates that send over a blocking socket should block if there is no system buffer space available: 
If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in a nonblocking mode. On nonblocking stream oriented sockets, the number of bytes written can be between 1 and the requested length, depending on buffer availability on both client and server machines.

So I guess you will have to write to MS support since your platform is affected with that bug.

As for having 3.51.05 and 3.51.12 on the same machine, it's possible (driver has the same name). To help me resolve this problem, please try with 3.51.07 and inform me if it produces the same error as 3.51.12.
[2 Dec 2006 7:51] Tonci Grgin
I made typo here... This sentence should read:
As for having 3.51.05 and 3.51.12 on the same machine, it's *NOT* possible (driver has the same name).
[4 Dec 2006 8:11] Mahayogya Tech Support
We are having two mysql servers running on 2 different machines.  From the client machines, there 2 applications which are running are accessing these servers, which are configured in default ports (3306) only.

Will this cause the above said problem? or will any problem may arise?
[4 Dec 2006 8:42] Tonci Grgin
Hi. I would pursue "Error 10055" as it's not ODBC but OS error. Until you fix that there's nothing much I can do. What does MS support say?

Even though I think it won't help, let's try disabling ODBC connection pooling,
in the ODBC control panel, explicitly turn off connection pooling. 
What's your setting for wait_timeout and max_connections variables on both servers? What does their error log say?
[4 Dec 2006 9:58] Mahayogya Tech Support
On the server where our application is installed, we have set max_connections=500, back_log=300 and wait_timeout=default value.

On the other server the values are set to default values only.

Both the applications are not working when the above issues happens.

please guide us through.
[4 Dec 2006 11:56] Tonci Grgin
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

Explanation:
You did not provide an answer to "What does MS support say?" since this is OS error code.
You did not provide result for "let's try disabling ODBC connection pooling".
Server variables are described in manual. What I was hinting at are, obviously, timeouts... 
Since you provided no answer to "What does their error log say?" I presume there are no errors in server logs.
[4 Dec 2006 12:18] Mahayogya Tech Support
You did not provide an answer to "What does MS support say?" since this
is OS error code.
You did not provide result for "let's try disabling ODBC connection
pooling".
Server variables are described in manual. What I was hinting at are,
obviously, timeouts... 
Since you provided no answer to "What does their error log say?" I
presume there are no errors in server logs.

Thanks for your reply..

We check with MS Support they have answered like "Operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full".

In ODBC control panel "Connection pooling" is already disabled.

I went through the ERROR LOG, i didn't find any thing fishy.., you can tell me what to look for.
[4 Dec 2006 12:58] Tonci Grgin
Well, 

"We check with MS Support they have answered like "Operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"." 

is *not* an answer from MS support but quote from manual regarding this error... 

There have probably been some updates to your system which caused this but I realy can't say which ones. You should ask MS to give you more info on how socket gets in this state and/or try figuring out yourself whith netstat -a or something similar. After all, you paid for working copy of windows, didn't you?
[5 Dec 2006 11:07] Mahayogya Tech Support
Thanks... for pointing it.

I tried to contact the MS support team, all i could get was this only.

But we getting this message with MyODBC driver only, physically the machine was always accessable.

May be i will try to contact MS support again.
[6 Dec 2006 18:14] Tonci Grgin
Ok, let's try some more. Seems to me it's either a TCP stack or memory issue. As we do not have any memory leak issues w/odbc3 I think TCP stack is more likely. 
I have four questions:
  How much memory is in use at the time of failure? 
  Does the system resume operation after a few minutes?
  What does netstat -a say at the time when problem occur?
  Do you run firewall and/or IIS?
[8 Dec 2006 12:45] Mahayogya Tech Support
Thanks,...

Please find the listing from the err file

061207  8:09:14  InnoDB: Started
MySql: ready for connections.
Version: '4.0.10-gamma-nt'  socket: ''  port: 3306
061208  8:43:26  InnoDB: Started
MySql: ready for connections.
Version: '4.0.10-gamma-nt'  socket: ''  port: 3306
061208 10:34:51  MySql: Normal shutdown

061208 10:34:52  MySql: Forcing close of thread 830  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 829  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 828  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 826  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 822  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 815  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 811  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 810  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 804  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 803  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 801  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 798  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 794  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 792  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 791  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 790  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 753  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 751  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 660  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 460  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 447  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 364  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 363  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 357  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 332  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 305  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 303  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 302  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 301  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 262  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 247  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 246  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 241  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 204  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 177  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 176  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 175  user: 'root'

061208 10:34:52  MySql: Forcing close of thread 119  user: 'root'

061208 10:34:53  InnoDB: Starting shutdown...
061208 10:34:54  InnoDB: Shutdown completed
061208 10:34:54  MySql: Shutdown Complete

061208 10:47:34  InnoDB: Started
MySql: ready for connections.
Version: '4.0.10-gamma-nt'  socket: ''  port: 3306
061208 11:28:30  MySql: Normal shutdown

061208 11:28:31  MySql: Forcing close of thread 59  user: ''

061208 11:28:31  MySql: Forcing close of thread 58  user: ''

061208 11:28:31  MySql: Forcing close of thread 52  user: ''

061208 11:28:31  MySql: Forcing close of thread 49  user: ''

061208 11:28:31  MySql: Forcing close of thread 48  user: ''

061208 11:28:31  MySql: Forcing close of thread 47  user: ''

061208 11:28:31  MySql: Forcing close of thread 46  user: ''

061208 11:28:31  MySql: Forcing close of thread 45  user: ''

061208 11:28:31  MySql: Forcing close of thread 44  user: ''

061208 11:28:31  MySql: Forcing close of thread 43  user: ''

061208 11:28:31  MySql: Forcing close of thread 42  user: ''

061208 11:28:31  MySql: Forcing close of thread 41  user: ''

061208 11:28:31  MySql: Forcing close of thread 40  user: ''

061208 11:28:31  MySql: Forcing close of thread 39  user: ''

061208 11:28:31  MySql: Forcing close of thread 38  user: ''

061208 11:28:31  MySql: Forcing close of thread 37  user: ''

061208 11:28:31  MySql: Forcing close of thread 36  user: ''

061208 11:28:31  MySql: Forcing close of thread 35  user: ''

061208 11:28:31  MySql: Forcing close of thread 34  user: ''

061208 11:28:31  MySql: Forcing close of thread 33  user: ''

061208 11:28:31  MySql: Forcing close of thread 32  user: ''

061208 11:28:31  MySql: Forcing close of thread 31  user: ''

061208 11:28:31  MySql: Forcing close of thread 30  user: ''

061208 11:28:31  MySql: Forcing close of thread 29  user: ''

061208 11:28:31  MySql: Forcing close of thread 28  user: ''

061208 11:28:31  MySql: Forcing close of thread 7  user: 'root'

061208 11:28:31  MySql: Forcing close of thread 5  user: 'root'

061208 11:28:31  MySql: Forcing close of thread 4  user: 'root'

061208 11:28:31  MySql: Forcing close of thread 3  user: 'root'

061208 13:28:40  InnoDB: Started
MySql: ready for connections.
Version: '4.0.10-gamma-nt'  socket: ''  port: 3306
061208 14:31:54  MySql: Normal shutdown

061208 14:31:56  InnoDB: Starting shutdown...
061208 14:31:56  InnoDB: Shutdown completed
061208 14:31:56  MySql: Shutdown Complete

061208 14:34:54  InnoDB: Started
MySql: ready for connections.
Version: '4.0.10-gamma-nt'  socket: ''  port: 3306

  How much memory is in use at the time of failure? 

  In the server machine, the memory is constantly building as the clients are accessing, they memory is not at all coming down.
 
  Does the system resume operation after a few minutes?

  Server machine is not showing any SUDDEN rise in cpu usage, but the client is not atall recovering.  After restarting it is connecting once, then the application is working fine.  if the application is closed and opened again the same thing happens - error 10055.

  What does netstat -a say at the time when problem occur?

  Not yet checked it

  Do you run firewall and/or IIS?

  Symantec Firwall is installed, but we have disabled it
[8 Dec 2006 13:13] Tonci Grgin
I believe netstat will show you are crowded with "dead" connections... From what I see it is not a MySQL bug...
[8 Dec 2006 13:23] Mahayogya Tech Support
Actually we have 60-65 clients, out of which 5-10 machines are giving this trouble.  Occasionally it disappears in some systems and appears in other systems which were working fine till now.
[8 Dec 2006 13:41] Tonci Grgin
Hi, you have networking troubles too. Some of the machines are spawning connections to server indefinetly choking everything because they think old connection is dead. Check netstat.
[8 Dec 2006 13:51] Mahayogya Tech Support
Thanks..

If you feel that our application has some problem, then why it is not connecting through the odbc driver directly also??

When conencting directly also the same error is displayed.
[8 Dec 2006 14:04] Tonci Grgin
You are not reading my answers.....
"Hi, you have networking troubles too." 

All I mentioned is OS and networking... no applications involved in my discussion.
[19 Dec 2006 11:27] Mahayogya Tech Support
Hai Hello,

Based on your replies, we tried to change the switch which was 10/100 mbps to a 2 gbps gigabit switch.  but still the problem persists.

please advice
[20 Dec 2006 6:37] Dragan Radovic
I received the SAME error with MySQL 5.0 and Connector NET 1.0.7 after calling the Dispose() method of a connection to attempt to dispose the connection thread to the db after calling Close().

I got rid of the conn.Dispose() and the error went away.

Regards,
Dragan Radovic
Edmonton, AB
ink.line@yahoo.ca
[5 Jan 2007 7:52] Tonci Grgin
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.