Page 1 of 1

Lost connection to MySQL server during query Socket error

Posted: Tue 26 Aug 2008 21:52
by sachse
I get following error:

"Lost connection to MySQL server during query Socket error on write. WSAGetLastError return 10054($2746)"

An other connection via mysql console client has worked very well.
The program had accessed the datatabse with a query before, that works very well.

If the mysql server is on a linux machine all works very well.
But if mysql on localhost (winxp sp3) is used this error occurs while executing a mycommand1.execute.

I had read the answer of Antaeus to the post of crafty from Fri Mar 14, 2008 1:39 pm.

This does not solve my problem because I use mycomand.

Re: Lost connection to MySQL server during query Socket error

Posted: Wed 27 Aug 2008 03:20
by eduardosic
sachse wrote:I get following error:

"Lost connection to MySQL server during query Socket error on write. WSAGetLastError return 10054($2746)"

An other connection via mysql console client has worked very well.
The program had accessed the datatabse with a query before, that works very well.

If the mysql server is on a linux machine all works very well.
But if mysql on localhost (winxp sp3) is used this error occurs while executing a mycommand1.execute.

I had read the answer of Antaeus to the post of crafty from Fri Mar 14, 2008 1:39 pm.

This does not solve my problem because I use mycomand.
after this exception you can connect to database? ou you have the wait a time?

if true it's a bug in efemeral port's with windows.. i have the solution

create a reg file and put this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:0000fffe
"TcpTimedWaitDelay"=dword:0000001e

restart the machine and enjoy.