473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

slow socket creation/connection

Hi

I'm trying to track down why the creation of socket connections on my
system is taking several minutes. I initially noticed this when
attempting a JDBC connection but even the simple

Socket socket = new Socket("host",port);

(from isAnythingListeningOn)

is taking several minutes even to non database (1433) machines (i.e port
22 connections are also very slow)

If I create several sockets in the same code, the first one takes
a long time, subsequent ones are essentially instantaneous.

We have a tomcat server running on the same machine that is happlily
making very fast JDBC connections.

A Perl script using

(IO::Socket::INET->new(PeerAddr => 'host',
PeerPort => 'port',
Proto => 'tcp',

has no problems making fast connections.

The fact that subsequent and the Tomcat connections are fast suggests
something is cached and/or it's the environment but ...

Java version 1.4.2, a similar problem was reported on
http://forum.java.sun.com/thread.jsp...sageID=2295073
Any advice?

Thanks
Mike
Jun 14 '06 #1
1 6334
To add more info

using java 1.3.1 everything is very fast.

using java 1.5 is the same as 1.4 i.e. first connection takes
several minutes.
Jun 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rami Saarinen | last post by:
I have been making a client-server type of software mainly on Linux and now I am trying to get it all work also on windows. However, I am having slight problems running the program in Windows 2000....
2
by: Jim W | last post by:
This is a cross-post from the .NET group since it looks like it may not be ..NET. New information since the original post is that is the wireless network is enabled and connected the socket...
5
by: Russell Warren | last post by:
Does anyone know the scope of the socket.setdefaulttimeout call? Is it a cross-process/system setting or does it stay local in the application in which it is called? I've been testing this and...
2
by: gcmf8888 | last post by:
I use socket client to connect to a server written in C++. I found out that the C# socket connection(I didn't use TCPClient instead i used socket) is extremely slow(comparing to Java and C++ one I...
5
by: PH | last post by:
Hi guys; I got a single processor computer, running an application that launches 2 threads. Each of these threads listens for incoming connections in a specific port, so there is a Loop ....
0
by: Michal Seidl | last post by:
Hi, I am trying to download data from remote ftp server connected through GSM modem. The speed is slow 1kB/s. Despite the classic linux ftp client works fine the ftp.retrbinary(),ftpretrlines()...
3
by: jku | last post by:
Hello, after installing DB2 V8.2.3 on OpenSuse 10.1 (in vmware) we have created a database instance with the restore command: db2 "restore database $OLD_DB user db2inst1 using db2inst1 from...
13
by: Arno R | last post by:
Hi all, I am deploying an A2k app to users with different versions of Access. Using Access 2000 the relinking on startup (on deploying a new frontend or when backend has changed) is very fast....
4
by: Andrew Jackson | last post by:
I am writing a newsgroup client. I have the protocol figured out. But I get slow transfer speeds off any of the network objects read the data from For example one of the commands for a news...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.