Bug #6645 Mysql 4.x.x
Submitted: 15 Nov 2004 22:26 Modified: 19 Dec 2004 15:34
Reporter: Abdennour Laaroubi Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.x.x OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[15 Nov 2004 22:26] Abdennour Laaroubi
Description:
I moved a database from mysql server instance (running in Linux) to another instance running in Windows 2000. I noticed that my application slowed down to the point where I couldn't use it. I read the bug database and I found that someone has the same problem (running web app in machine A that connects to mysql server running in windows machine B). However, that issue was reported in July 2003 and was supposed to be fixed. Appartently it's not fixed yet and you can reproduce it by simply moving your database server to different box then your applicaton server.

The documentation (
http://dev.mysql.com/doc/mysql/en/Windows_testing.html) said this issue may occur in windows 95/windows me and if you use names instead of IP addresses. The problem happens in the latest version of mysql, in windows 2000 and windows XP. using an IP address wouldn't help.name:
e.g:
jdbc:mysql://192.168.0.100/System4_2fqa
or
jdbc:mysql://dbserver/System4_2fqa  (dbserver=192.168.0.100)

will not make difference.

How to repeat:
see description.
Install a web app in windows machine A and the database server in windows machine B. 

Suggested fix:
add skip-name-resolve under  [mysqld] and restart the database server. That will make huge difference. You will see the performance you expect from the fastest database in the world  :).
[17 Nov 2004 2:24] MySQL Verification Team
Looks like a Windows tune-up issue. Could you please show for us the output
of:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

f:\>nbtstat -a remote_machine_name

Local Area Connection:
Node IpAddress: [192.168.0.33] Scope Id: []

.........
[17 Nov 2004 18:45] MySQL Verification Team
Thank you for the Info. Indeed the solution is to use --skip-name-resolve
like you have mentioned. Can you provide a test case that I can run
the MySQL server on Windows 2003 and the Client on XP ? Because I
already did tests using client with C API and wasn't able for to see
that problem.

Thanks.
[19 Nov 2004 15:34] Abdennour Laaroubi
Hi,
I am using Connector/J ( latest version), Tomcat 5.x.x, jdk 1.4.2, windows XP for the web app, and widows 2000 for the database server.
I can reproduce the problem by following these steps:

1- Create connection (using connector/J)
2- Create statement (select * from <any table>)
3- Display the result to the console.

Now, it will take while before the driver get a connection(that's the heart of the problem). After that, every thing goes fast. But every time, you try
to get connection, it takes while.....

If I am move the database server to the same server where the application server is running, I don't see the problem any more. Also, the problem is solved if I move the database server to a Linux box.

I hope this will help.
[14 Feb 2005 22:54] 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".