Multiple port opened for one db connection.

My java standalone server connects to sql server via MS sql JDBC driver(v 2.2). I saw so many port in Time_wait state to the db server in netstat. I did some search on the internet, found that this the nature of TCP/IP protocol. and we can live with it without modifying Windows config.
however, I noticed on my side, there are two ports involved for each database connection. I think this is one of the reasons I have so many ports in Time_wait state.
To me, it seems like the request to db server is done on one port, the response from db server is done on another port. is this implemented on JDBC driver layer or on sql server?
please help !!!

I saw so many port in Time_wait state to the db server in netstat. This suggests that you are not using any type of connection pooling, but instead are opening and closing connections pretty quickly, although it depends on what you mean by "many"; 10 or 100 might be a good number for a busy system, depending on your application. On some operating systems under high load, it could potentially be a problem if you are getting into many hundreds or thousands, but other issues usually drive people to using connection pools long before this issue would.
however, I noticed on my side, there are two ports involved for each database
connection. I think this is one of the reasons I have so many ports in Time_wait state.Not really. That might double the number, but the real reason is a lot of connection closes (real connection closes, not closes on a pooled connection).
To me, it seems like the request to db server is done on one port,
the response from db server is done on another port.
is this implemented on JDBC driver layer or on sql server?That is totally up to the driver vendor; there's nothing you can do about it.
please help !!!I'm not sure what you're problem really is - you might be worrying about something that isn't a problem. Is something bad happening that you're trying to fix, or did you just notice these expiring ports and start worrying about them?

Similar Messages

  • Ability to open multiple SQL Worksheets for the same connection

    Hi,
    Please allow the ability to open multiple SQL Worksheets for the same connection, now only one can be opened.
    Thanks

    Logged Bug 9000801 - ea1: otnforum: worksheet launcher does not remember the last/default connection
    -Raghu

  • Is there a fix for Mail keeping 4 connections open for one.......?!

    Is there a fix for Mail keeping 4 connections open for one email account setup as IMAP.......?!
    Im just wondering whether this is possible because it means our company website falls over when the processes go over 25! There are a lot of emails.....
    It is a massive pain and ideally we dont want to upgrade our hosting package if we can help it!
    There must be a way round it?! Someone brainy know any tricks?!

    Ernie Stamper wrote:
    Never have encountered this -- more info, please? What are 4 connections, exactly?
    Very simple: Mail opens one connection for each IMAP mailbox on the account. Typically, this means Inbox, Sent Mail, Drafts, and Trash, but also includes Apple Mail To Do and Junk and any mailboxes/folders the user has created.
    The problem is that Mail is keeping these connections open when it's done checking for new mail, even when *Use IDLE command if server supports it* is not enabled. With 4 email accounts on one server, this causes a "500 Internal Server Error" because there are too many processes running. As soon as I quit Mail, my web server resumes serving pages.
    Message was edited by: Don Morris

  • When I open iTunes it is slow to open for one, and two when it does see my iPhone and i go to sync it this is what I get in return... The iPhone "My Name here" could not be synced because the iPhone could not be found on the network. that is a pop up box

    When I open iTunes it is slow to open for one, and two when it does see my iPhone and i go to sync it this is what I get in return... The iPhone "My Name here" could not be synced because the iPhone could not be found on the network. that is a pop up box in middle of screen that says that it does it like every time I go to sync the phone after i do app updates. I am getting very frustrated by this can someone please help. I have made 2 other discussion topics about this and no replies on them. Please if anyone can help I ask for help. This has occurred ever since the iOS 5.1 update and the iTunes 10.6.0 and still continues with the iTunes 10.6.1 update just yesterday and perhaps even worse now. PLEASE HELP IF YOU CAN. I have looked through my network settings etc and everything looks good here on my side.

    When I open iTunes it is slow to open for one, and two when it does see my iPhone and i go to sync it this is what I get in return... The iPhone "My Name here" could not be synced because the iPhone could not be found on the network. that is a pop up box in middle of screen that says that it does it like every time I go to sync the phone after i do app updates. I am getting very frustrated by this can someone please help. I have made 2 other discussion topics about this and no replies on them. Please if anyone can help I ask for help. This has occurred ever since the iOS 5.1 update and the iTunes 10.6.0 and still continues with the iTunes 10.6.1 update just yesterday and perhaps even worse now. PLEASE HELP IF YOU CAN. I have looked through my network settings etc and everything looks good here on my side.

  • Ever since the last update, My iTunes continues to quit unexpectedly. It will open for one second and then close. Anyone have a solution for this. Please help.

    Ever since the last update, My iTunes continues to quit unexpectedly. It will open for one second and then close. Anyone have a solution for this. Please help.
    I've tried my best to troubleshoot. . . opening in safe mode nothing seems to work.
    In the problem report, this is the error that stood out:
    Crashed Thread:  8  Dispatch queue: com.apple.iad.iadidmanager
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000090

    Hi there navicin79,
    You may find the troubleshooting steps in the articles below helpful. The first thing I would try is reinstalling iTunes as outlined in the first article.
    Troubleshooting iTunes installation on Mac OS X
    http://support.apple.com/kb/ht2311
    OS X Mavericks: If an app freezes or quits unexpectedly
    http://support.apple.com/kb/PH13975
    -Griff W. 

  • Can i have multiple applications open on one page

    can i have multiple applications open on one page?

    JShimazaki wrote:
    Mac OS X Mountain Lion supports multitasking like cbs20 mentioned. Just like MS Windows just press alt+tab to switch to whatever applications you have open.
    Actually it isn't Alt-Tab on OS X, it's Command-Tab to use the Application Switcher.
    Also, Control+ left/right arrow key will switch spaces if that's what's desired.

  • Multiple free goods for one item in standalone CRM

    Hi Gurus,
    We are trying to implement multiple free goods for one item in standalone CRM.
    As per SAP.help.com, it says that we can configure multiple free goods scenario in standalone CRM system.
    We tried to set up this in our system.  Basically we want to implement the scenario, where a user wants to  purchase item A, he should get a prompt for choosing between two free goods  B and C.
    We did the relevant IMG settings required for Free goods at  IMG ->CRM -> Basic Functions -> Free Goods.-> Set up Free Goods
    We also did the relevant item category determination where we have made an entry with
    Item Usage = " Free Goods" , Main item cat. = "TAN' , Item Category = "TANN".
    Now we went to create condition records in the path  "SAP Menu -> Master Data -> Prices and Conditions -> SAPCND/GCM - Maintain condition"
    We chose Application ="PRT", MaintenanceGrp="PRT_FGOODS", Maintenance context ="GCM"
    Then while creating conditon records , when I try to create two condition records where the Main Product is same but free good product is different, the system is not allowing to save these two condition records.
    it is giving error "Overlapping validity periods for two condition records".
    Please advice, if i am missing something. Thanks in advance for your help.
    thanks,
    Randhir
    Edited by: Randhir Soni on Feb 8, 2010 8:12 AM

    Constraints in free goods in R3 taken from SAP library
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
    Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    Free goods are only supported for sales orders with document category C (for example, not quotations).
    Free goods are not supported for deliveries without reference to a sales order.
    Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    This answers your qn Not possible in R3
    If you are on Retail scenario this is possible thro bonus buy schemes
    But a lot of customizations needs to be done and you need a retail server to do that
    Regards
    Raja

  • Multiple free goods for one main material

    Hello SAP Gurus,
    we have a business requirement that to issue multiple free products for one main product, if the upliftment is beyond the specified quantity.
    Using free goods functionality, is it possible to achive the above requirement.
    e.g                                                     Quantity
    main product        123456                         10
    free goods             xxxxx                           2
    free goods             yyyyy                           1
    is it possible to maintain such data thru free goods or any development needs to be done.
    regards
    Casimer

    Constraints in free goods in R3 taken from SAP library
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
    Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    Free goods are only supported for sales orders with document category C (for example, not quotations).
    Free goods are not supported for deliveries without reference to a sales order.
    Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    This answers your qn Not possible in R3
    If you are on Retail scenario this is possible thro bonus buy schemes
    But a lot of customizations needs to be done and you need a retail server to do that
    Regards
    Raja

  • Creation of multiple cost center for one emplyee

    HI All,
    I have requirement . one emplyee is working two projects so need create two cost centers for one employee.
    please tell me how create multiple cost center for one employee.
    Thanks&Regards
    ramesh

    hai.
    if he works half the time... u can give 50%.. or just get it confirmed from core team member..
    manu

  • ITunes has stopped working message after having it open for one minute.

    It's fully updated to iOS 5 and was working fine until now. Running on Windows 7 and worked flawlessly till this point. Any tips? I already uninstalled and reinstalled. Only security software I run is Microdoft Security Essesntials and that has never been an issue. At a loss here.

    iTunes has stopped working message after having it open for one minute.
    I open itunes and a message comes up after a minute "itunes has stopped working". I got the update automatically to my Windows 7 64 bit pc 10.5.0.142.  After reading tons of probelms online about version 10.5
    I have decided to do nothing for now.  Seems people are putting hours into trying to fix it.  I was going to uninstall and reinstall but seems that isn;t working for to many people.
    How do we get some help from apple? 
    Anyone have any answers???  APPLE HELP please!!!!!!!!!!!!!!!

  • Show or view multiple album art for one song on iPhone 4?

    Is it possible to show or view multiple album artwork for one song on an iPhone 4, especially on the now playing screen? I figured since iTunes has this feature then the iPhone should too. Can I download an app that does this? I've searched but couldn't find any, maybe I'm using other keywords. Could anyone point me in the right direction with this?

    Darn. I hope an app is designed to be able to do this soon. From what I've seen this feature isn't really in demand so it could take a while. Thanks for replying.

  • Multiple Lease Duration for one DHCP Scope?

    Hi All,
    I have an urgent question. I wanted to know if it is possible to have many lease durations for different computer groups getting their addresses from one DHCP scope. I saw somewhere that it is possible to use User Classs or Vendor Classes for setting a lease
    duration for a group of computers sharing the same class Id ?
    If it is true, How can to configure ?
    Also i would like to know about the lease duration period what is the maximum days can we have ( 8 days After )?
    Thanks
    Atul

    Please refer to the following-
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/26de79f9-6ad7-4088-9077-006b9dd8c1fb/multiple-lease-durations-for-one-dhcp-scope?forum=winserveripamdhcpdns
    You can configure any value as lease duration; however if you want a very big/infinite value; it makes sense to convert the lease(s) to a reservation.

  • Multiple component instances for one component usage

    Hi,all
    How can I create multiple component instances for one component usage.
    I'm using the following code for creating  a single component instance for specific component usage:
    if(c_Usage.hasActiveComponent())
          c_Usage.deleteComponent();
    if(wdContext.currentContextElement().getSelectedTab().equalsIgnoreCase("Registered"))
          c_Usage.createComponent("health.gov.registered.Registered";);
    I can't create one more component instance for
    IWDComponentUsage c_Usage
    cause I have to delete the component instance associated with this component usage.
    Any idea how can I do it anyway?
    Regards,
    Michael

    Hi,
    To create another instance of the same component you need to embed the same component under the Used Components more then once. For Example if you have Componet A to which you want to embed Component B then under "Used Components" of Component A add component B twice.

  • One application won't open for one user

    We are doing a rollout of Macbook Pros to a group of people. We have used migration assistant for 20 computers. One application will not open for one user on each of the computers. The applicaiton will open for users that are added, but not the admin user that the application was originally installed. We have tried uninstalling and reinstalling the application with the same results. The one user can not log in. The permissions look right for all files.

    How about clarifying some things for me? Does each machine have a different admin user? What user installed the application that won't open (you say there is only one?) How many users on each machine - one or many? How many admin users are there? How many users are Standard or Managed users? What user "can not log in?" Is this on one machine or all machines? Which is the application that won't open, where is it installed, what are the permissions for the application, what are the permissions for the folder in which it's installed?
    Are these computers on a network or operating standalone or does each person in the group have their own separate machine?
    From where did you migrate for these 20 computers and why did you use Migration Assistant? MA is not the correct tool for doing a multi-system configuration. This is usually done using a net-based installation from a machine running OS X Server or from an XServe or by creating a standard system DVD and installing via ASR.

  • Keep a Socket Server connection/port open for incoming requests

    Hi,
    I have a socket server which listens to the incoming messages. The problem is that the socket server terminates the socket connection once it receives a message.
    I want this Socket server to keep on running and process all the requests it receives.
    Can you please advise which stream shall be kept open for this to be achieved? Below is the code for your reference.
    Thanks!
    import java.net.*;
    import java.io.*;
    public class SocketServer
         public static void main(String[] args) throws IOException
                 ServerSocket serverSocket = null;
                 String result = null;
                 SocketServer sockServer = new SocketServer();
                 try
                          serverSocket = new ServerSocket(4444);
                 catch (IOException e)
                          System.exit(1);
                 Socket clientSocket = null;
                 try
                      clientSocket = serverSocket.accept();
                          clientSocket.setSoTimeout(30000);
                 catch (IOException e)
                      System.exit(1);
                 PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
                 BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
                 String inputLine;
                 inputLine = in.readLine();
                 if((inputLine == null) || (inputLine.length() < 1))
                          throw new IOException("could not read from request stream");
                 else
                          result = sockServer.parseString(inputLine);
                          out.println("|0|OK|");
              InputStream is = null;
                  FileOutputStream fout=null;
                  BufferedInputStream bufIn = null;
                  HttpURLConnection con = null;
                  ByteArrayOutputStream baos = null;
                    try
                   URL url = new URL("http","10.176.96.64",8080,result);
                   con = (HttpURLConnection)url.openConnection();
                   is = con.getInputStream();
                   bufIn = new BufferedInputStream(is);
                   fout=new FileOutputStream("Z:\\Clips\\Cache\\"+result);
                   baos = new ByteArrayOutputStream();
                   int c = bufIn.read();
                   while(c != -1)
                        baos.write(c);
                        c = bufIn.read();
                   baos.writeTo(fout);
              catch(MalformedURLException mue)
                   System.err.println ("*********In Download File: Invalid URL");
              catch (IOException ioe)
                   System.err.println ("*********In Download File: I/O Error - " + ioe);
              finally
                   try
                        baos.close();
                        bufIn.close();
                        fout.close();
                        is.close();
                        con.disconnect();
                   catch(Exception ex)
                        System.out.println("*********In Download File: Exception Occured: "+ex.toString());
                      out.close();
                      in.close();
                      clientSocket.close();
                      serverSocket.close();
    }

    In a truly unexpected turn of events.. this question has been crossposted.
    http://forum.java.sun.com/thread.jspa?threadID=5127579
    Good job singalg. I highly recommend that instead of accepting that there is anything wrong with your understanding of how this should work and reviewing the tutorials you should instead repost this question daily, Each day choosing a different forum.

Maybe you are looking for

  • Using the mini displayport to HDMI on W530

    I have read thru the similar threads regarding using the mini displayport on the W530 and seem to get some conflicting info.   I bought an mini display port to HDMI adapter and am trying to connect it to my Samsung monitor and it does not work, no si

  • Help with autoplay w/out gallery.js

    Hello, I need some help with a project I'm trying to complete.  I am working on a simple interface for some photos of family.  I've attached my interface mockup, or you can view it quickly here: http://picasaweb.google.com/lh/photo/C_6LgYVWjxAEELKOk8

  • Automated export/import of objects

    We have an installation of Tarantella Enterprise Edition 3.42. We would now like to "upgrade" to Enterprise Edition 4.0. For specific reasons we do not want to do a normal upgrade. Instead we would like to setup a new server, prepare the new environm

  • How can I delete my residential number from busine...

    Hi, We have had this residential no. since we moved 8 months ago, BT gave us an old business number! Because of kids etc we can't easily change the no. how can we remove it from website/  business listings? inc google search etc. BT were out of order

  • How to view a windows external hard drive on a mac?

    I have this windows xp laptop with an external hd attached to it. I want to be able to view and edit the files on that hard drive from my macbook over my wireless home network. How do I do this? How can I mount the hard drive on my macbook?