I have a RMI server running on a Windows box and the client running on a Linux box. The two communicate via the Internet. My problem is that when I
invoke the server from the client for the first time it can take up to 62 seconds for the server to receive the call. I know this because I watch the console and I can tell
exactly when the server receives the call from the client. Subsequent calls take about 6 seconds to reach the server thereafter, which is aceptable.
Why is this happening? Could it be a DNS lookup issue or a process in the RMI system downloading files over the network? I doubt if the problem is related
to client downloading files since the files are tiny anyway. So what could it be?
Thanks for your help in advance.
In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
DNS requests can indeed be a reason for high latency in networks but over 1 minute would mean that the DNS server is really, really slow. I guess there must be another reason.
Class file downloading could be a problem, too. This depends of course on the number and size of classes and the connection speed between client and server. But in general the class files aren't that big and should be no real problem. The easiest way would be to put all up to date classes into the client and server code in order to prevent remote class loading for testing purposes.
If this doesn't help then you should probably use a sniffer (like Wireshark) so you can simply monitor what's going on. Then you will definitely see if there's just too much traffic for your internet connection or if the client/server is waiting for something.