Mikel Lertxundi wrote:
> Hi Tetsuro,
>
> I donĀ“t manage any socket 'cause all delegate all
> that boring staff ;) to the mysql Connctor/J
> driver, but I found that when a make a netstat at
> my console (I'm running Windows XP, and the BD
> server is in 2000) a get this:
>
> TCP mlertxundi:4986 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4987 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4988 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4989 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4990 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4991 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4992 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4993 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4994 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4995 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4996 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4997 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4998 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:4999 192.168.1.17:3306
> TIME_WAIT
> TCP mlertxundi:5000 192.168.1.17:3306
> TIME_WAIT
>
> (a lot of time repeated)
>
> Know why?
> and thanks a lot anyway ;)
Mikel,
Windows XP limits how many outbound TCP/IP connections a process can make in any one period of time once SP2 is installed. Even without SP2 installed, there is a cap of approximately 5000 open TCP sockets for all processes in total on the machine (whether they're connected , or in TIME_WAIT after being closed). There is a registry setting to fix that (http://support.microsoft.com/kb/q196271/), but if you're running into this problem it _usually_ means you are creating way too many TCP/IP connections in a given amount of time.
Windows XP isn't really designed to be a server (and in fact, the EULA for it in most countries prohibits it). If you're trying to write a high-throughput server program and want to use Windows you need to look at one of their server products.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html