Open more than 65k TCP/IP connections

Hello,
is it any possibility to open more than 65535 TCP/IP connections from one IP address as client? Because each connection occupied one port, I can't make more than 65k. Can be established more outgoing connections (as client) from one port to more different servers simultaneously? Thank you for any advice.
Ceny

The naive way will only let you open about 32K sockets before it fails.
In order to get more you need to reuse the socketnumbers:
#include <sys/socket.h>
void BindSockToPort(int fd, int port) {
    sockaddr_in sa= {AF_INET,  port, INADDR_ANY};
    unsigned int one= 1;
    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one);
    if(bind(fd, (sockaddr*) &sa, sizeof sa)) perror("bind");
}Then you can connect.
From same port you must of course connect to different endpoints.
And this has of course nothing to do with sun studio C++. But I had just solved the problem myselfes, so...

Similar Messages

  • ORA-31223: DBMS_LDAP: cannot open more than 63 LDAP server connections

    I get this when I use the function wwv_flow_ldap.is_member
    which is a HTMLDB package.
    I use this function on every page for authorisation but after a while i get this error.
    Metalink says to close the unused connections, but unfortunately it doesn't say how to do this.
    I tried asking the HTMLDB people how and why this function opens connections without closing them but before I end up hoping for a patch I'd like to know if there is a quick fix to close unused connections with a procedure....

    You need a handle to the LDAP session to close the connection, so it really needs to be done by the entity that opened it.
    If you have access to the LDAP session, then you could close it if you have some sort of "end of request cleanup processing routine". This is what the standard Portal code does. Since yours is a HTMLDB-specific issue, you may need a fix from them.

  • DBMS_LDAP: cannot open more than 63 LDAP server connections

    Got this error, when working with PORTAL.WWCTX_SSO package.
    Could anybody suggest any better solution?
    TIA

    If you are using any custom code,check If you are closing the connections.

  • J2ME app doesn't open more than 2 internet connections

    Hi,
    I'm developing an application which has to access three web pages for which I use
    (InputStream) Connector.openInputStream(URL);Two times everything works fine, but when the third method which opens a connection is called, in 9 out of 10 tries the call doesn't return.
    If I exclude one of the first two connections the thrid one works, so it seems to me there is a general problem on opening more than 3 connections??
    The phone I'm using is a Nokia 6110 Navigator and I'm developing under MIDP 2.0. Unfortunately I have no other phone to check whether it is a device related problem.
    Anybody an idea what I can do about this problem?
    Cheers Simon

    How explicitly and thoroughly did you close the other connection(s)? The phone's library may be keeping a connection open in wait mode, so that any remaining data can be drained. You might try running in an emulator and doing a netstat (or equivalent) from a shell; watch to see when your connections really close, and see how that correlates to when the new connection does/doesn't succeed.

  • Upgraded to iOS 6 and now I can't open anything in the kindle app? I have to say that I have had my ipad3 for 6 months and intensely dislike the problems with using it. Also is there any way of opening more than one screen as it is hopeless otherwise?

    I Have had my iPad for 6 months as I cannot access my work emails using windows. I have to say that it is the most unhelpful device I have ever used and although it looks like there isn't an answer for some of the questions I have asked below, I thought I would try!
    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    IT might just be that I don't have the correct settings (I am a technophobe) but I absolutely hate the iPad and only have it for work emails, it is so annoying that I can get my mobile phone and kindle3g to work fine, but always have problems with the iPad. I am sure it could be good (and for reading emails on the go in the uk it is great, as I like the key board) but it just seems to make everything else difficult.
    i Hope you can help and sorry for asking questions others have, but I am just hoping that something new might have been developed!
    thanks,
    K
    Message was edited by: K Paton

    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    Try rebooting your iPad, that should fix he issue. I that doesn't work, delete the app and re-download it.  The Kindle books should all be in he Kindle cloud services and you can get them again. I have an iPad2 w/ Kindle app and it works just fine - no issues.
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    Page as in a kindle book way? turn iPad to landscape position from portrait position. If, however, you mean open more than one application at a time, then no. And not hopeless, as it takes a bit of time to get used to, going from a desktop/laptop format to tablet format.
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    It's actually fairly easy. Press down on the word, then you can expand by drawing your finger to cover word/sentence/paragraph/page, hit select or select all then it gives you the option to cut, copy, paste, define. If you want to use a word processing app on the iPad, Pages is a good application.
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    It's the connection on your phone. Samsung Galaxy SII? Android software?  What you have to do is go to the phone's settings and connect via wireless, not Bluetooth. Go to System Settings (on phone) and under Wireless and Networks click 'more' and go to the Tethering and Portable Hotspot option. Set up your mobile wifi hotspot,  name it though it will probably come up with 'AndroidAP', choose a WPA2 security level and put in a password. Go back to previous screen and turn on 'Portable Wi-Fi Hotspot' box. Then on your iPad in the Settings - Wi-Fi section, it should then recognize your phone for tethering. If it's a Windows Phone 7,  I don't know the layout of that software, but presumeably similar.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    Sometimes the issue is with the website design, not all websites are optimized for mobile devices - not just iPad but also Android devices. It happens. They're getting there, but occasionally the page might need a refresh.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    It depends on what you use to build the websites on the computer. Recommend a free program on the computer called CoffeeCup Free HTML Editor. I don't recommend using IE period; Firefox or Chrome are my choices on Windows machines. I have two websites that I manage, both using this program. I'm assuming that when you mean you can't access the sites on the iPad you mean to update them? Ostensible there are apps to let you do this. What format are the sites? Without seeing what exactly you mean and what you want to do, it's hard to explain.
    As for seeing full page while emailing within a site, turn iPad to portrait mode, and try to finger-pinch touch the screen to see if that will bring the fuller page  into view. Other option is opening a second tab with same website and just go between tabs to reference material.
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    If you were outside the US or Canada, my guess is the problem lies within the SIM card in your iPad. If you were outside North America, there are different band levels - I'm guessing you have a SIM thats locked to a particular provider. Band level frequencies differ per country/continent, so a SIM card that will work in Canada/US will not likely work in UK/Europe/Asia/Australia, etc. you will be able to get your emails again when back on a wifi network. Mobile phone may have a different type SIM card (GSM/HSPA) from your iPad SIM. Also, check your email settings.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    Moving the cursor on a sentence is a matter of putting your finger on the screen where you want it. It's exceptionally easy to do. I'm using the Notes app to write this whole segment and I just need to put my finger where I want to change things and presto it's ready for me to change where I want it.
    Here's a solution: sell your iPad (after you wipe your data off it) to someone who will appreciate it, and put your money towards the Windows Surface Tablet out later this year/early next year, where you can (reportedly) connect a mouse to it. It will have some of the Windows 7/8 functionality that you're more familiar with, or get a netbook.
    - Ceridwyn2

  • Can i open more than one Resultset object

    hi in my program i have to retrive data from three table and the data from three
    table i have to use in another one
    i wanna know that can we open more than one ResultSet object within one
    try{
    }catch{] block ( i means ResultSet rs = st.excuteQuery(query) more than one time for different -different tables)
    or there is any other way to do this

    You can only have one active result set per statement at a time.
    Depending on the driver you are using you might be able to have more than one active statement (and result set) on one connection. Or not.
    Try catch has nothing to do with that.
    If you are nesting result sets then it is likely you should be using a join (SQL) which would then only require one result set.

  • Ttcserver restarts when there are more than 5 c/s connections

    Hi,
    I am having some problem with C/S connection.
    When more than 5 c/s connections are connected to datastore, ttcserver restarts.
    No applications are running. Only tried to connection with c/s mode.
    Message logs are like below.
    ## tterrors.log
    2010-04-21 15:52:56.36 Warn: : 4891: TimesTen Daemon Release 11.2.1.4.0.tt1121 started.
    16:11:46.18 Warn: SRV: 4902: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4917: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4925: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4913: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4921: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4909: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.29 Err : SRV: 4926: EventID=99| ttShmCreate: shmget(1560567862, 1048576, flags) failed with system error 17
    ## ttmesg.log
    16:11:45.16 Info: SRV: 4925: EventID=16| Connect succeeded from client: jjwas1 (was1); IP address: xxx.xx.xx.82; Client PID: 4143; DSN: tt; UID: dba
    2010-04-21 16:11:46.18 Info: : 4891: maind 6: socket closed, calling recovery (last cmd was 8)
    16:11:46.18 Warn: SRV: 4902: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    2010-04-21 16:11:46.18 Info: : 4891: Starting daRecovery for 4896
    16:11:46.18 Warn: SRV: 4917: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    2010-04-21 16:11:46.18 Info: : 4891: Finished daRecovery for pid 4896.
    16:11:46.18 Warn: SRV: 4925: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    2010-04-21 16:11:46.18 Info: : 4891: maind 10: socket closed, calling recovery (last cmd was 9)
    16:11:46.18 Warn: SRV: 4913: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    16:11:46.18 Warn: SRV: 4921: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    2010-04-21 16:11:46.18 Info: : 4891: Starting daRecovery for 4896
    16:11:46.18 Warn: SRV: 4909: EventID=99| Main server has unexpectedly exited; child server exiting and client connection terminated
    2010-04-21 16:11:46.18 Info: : 4891: 4896 ------------------: TimesTen Server exited
    2010-04-21 16:11:46.18 Info: : 4891: Spawning '/memdb/TimesTen/tt1121/bin/ttcserver'
    2010-04-21 16:11:46.18 Info: : 4891: Spawned new process, idx 5, handle 0x133e=4926
    2010-04-21 16:11:46.18 Info: : 4891: Finished daRecovery for pid 4896.
    2010-04-21 16:11:46.19 Info: : 4891: child 4896 gone, terminated with signal 11, core dumped
    When i faced it at first, thought shared memory will be a problem. But enough physical memory and enough shmmax(or other kernel).
    Also created other datastore with large size of perm size and worked ok.
    Any idea why this is happening? Seems like log mesg with -verbose mode does not gives any clue to me....:(
    * x86-64bit Solaris10
    * ttversio : TimesTen Release 11.2.1.4.0 (64 bit Solaris/x86)
    Best regards,

    Hi Adam,
    Yes, I opened a SR with this issue.
    Was wondering anyone else had a similar exprience.
    regards,

  • Not able to display more than 65k records in Bex report.

    Hi Experts,
    I have requirement for the Bex report to display more than 65k records..
    Please help me on this.. i am feed up of get proper update for this..
    Its urgent.. pls help on this

    Hi,
    The Excel 2007 have a limit of 1,048,576 rows, unfortunately SAP cannot export more than 65.536 rows that is an exiting limitation exporting to Excel files.
    The note 700206 explains the MAX Size Limit for XXL Export, and it's
    not possible to increase this limit. XXL Export is generic export
    utility to export the list object from SAP to Excel and it cannot
    work differently for different Excel releases.
    I would emphasizes the purpose of BEx Analyzer: it is not a tool for the
    mass extraction of data, but it is a viewer/navigator tool for data.
    For huge exports like the one mentioned SAP offers Open Hub as a 3rd
    party tool. You can have more details in the url below:
      https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.
      docs/library/icc/BW-OHS%20Open%20Hub%20Service%2c%20Third-party%20
      Integration.pdf
    Thanks,
    Venkat

  • Export from Discoverer to Excel more than 65K rows

    Hi
    I need to export data from discoverer to excel, in some cases it is more than 65K rows, does any body know if the file can be split in multiple files o worksheets in Excel?
    Any help will be appreciate
    Thanks
    Vladimir

    Russ
    The short answer is I didn't know, as in any instance where my end users have wanted to extract large amounts of data they have done it from one sheet, I expected that Discoverer would just create the extra sheets for both but I wanted to know for sure, so I did a test.
    I created a Disco workbook with two worksheets in it, the first one I called Monthly and it had 119,409 rows in it, the second I called Weekly and it had 299,775.
    The first time I did the export I did it by hitting the Excel icon on the toolbar, it therefore only extracted the first worksheet (Monthly), when I opened the ensuing Excel file it had two worksheets in it, one called Monthly, the other called Monthly_1 and as expected, between the two sheets the had exactly the same number of fields as in the original disco sheet.
    I then redid the extract going through the menu and chossing extract entire workbook, Discoverer then re-extracted the sheets. In the Excel file this time I had the same two monthly sheets as before and this time I also had weekly sheets, five of them. So I ended up with an Excel file with seven sheets containing all of the original data.
    Cheers
    Melanie

  • What if i need more than one prepareStatements per connection

    hi all!!
    Please take some time to look into this scenario.
    On the front end: User enters/ updates his/her records and submits. An ArrayList of object goes to backend.
    On back end: i have to loop for the size of the ArrayList submitted and see if some record is to be updated or inserted.
    Now at back end i do following steps:
    I have only one Connection object named connection.
    Step 1:
    query (say query1 )to see if the record in DB exists for the primary key as extracted from the element from ArrayList. So one prepareStatment ( say prepareStatement1) for this. I write a query and execute :
    prepareStatment1= connection.prepareStatement(query1);
    Step2 :
    A query ( say query2) to update Data in DB. And i have a separtae prepareStatement for this and i execute
    prepareStatment2 = connection.prepareStatement(query2);
    Sep3
    A query (say query3 )to insert Data in DB. And i have a separtae prepareStatement for this and i execute
    prepareStatment3 = connection.prepareStatement(query3);
    Step4:
    for: size of arraylist:
    1. take out the element at ith index from the list.
    2. see if the record exists i.e execute step1 and see if resultSet.next() is true.
    3. if record exists step2 applies so execute update query
    4. if record doesnot exist then go to step3 and execute insert query
    A weird thing happened .. insert was running fine but update was not. May be i was not checking appropriately. BUT the error that occurrd was that
    [Microsoft][ODBC SQL Server Driver]Connection is busy with
    results for another hstmt.
    So i changed my path and in loop i prepareStatement and execute query to see if record exists or not and store the result in some boolean variable and then close this prepareStatement. and if the result existed again prepare a statement for update or else prepare a statement for insert and execute the respective.
    and then again close this prepareStatement and go for next iteration of loop
    so each iteration i am preparing statement and then closing it BECAUSE Connection doesnot allow more than one statement per connection at one time. Am i right.??
    what should i do.? Although i have solved problem by closing and preparing in loop but that is so inefficient. Is there some elegant way???
    please reply.
    PS: I am using ms sql server 8.0 as my DBMS. I am developing web application using Sun Creator.

    No, you can use as many PreparedStatements as you like, all from one Connection, and you can keep them open as long as you like. (I do this with no problems.) Where you will run into problems is when you are trying to use two ResultSets at the same time. That's what the error message means, it just doesn't use JDBC terminology.

  • Photoshop can't open more than one graphic at a time without crashing

    I get the error:
    The instruction at "0x7c918af2" referenced memory at "0x00000010". The memory could not be "written".
    Anytime I try to open more than one image in Photoshop at a time, regardless of how I do it - doesn't matter if I choose the image and "open in photoshop" or if I am in photoshop and go to "file/open".
    It's Photoshop CS3. I have already uninstalled, restarted the computer and reinstalled. I tried to "repair/change" from Windows, but it asks for the CS3 cd and then CS4, which I don't have since I'm using CS3. 
    This is quite frustrating as it would be nice to be able to merge photos and the myriads of other things you can do with multiple images at once, if opening them does not crash your program.

    mikeobe wrote:
    OK, kinda slooow here, I hope I'm not trying your patience!? If I understand you correctly, install dummy drivers and then the drivers that came with my printer, Designating NO default printer! Then when I need to use the printer I will have to declare which one each and every time?
    Or, just intall by new printer but do not Delcare it as the Default printer, I guess in this instance there would be NO default printer?
    You may not even have the problem!
    Have you installed the new printer yet?
    There are many more people who don't see it happen than those who do.
    PS: there is always a default printer.

  • Error - Can't open more than one image in CS3

    My Photoshop CS3 was working fine until all of a sudden it no longer lets me open more than one image at a time without crashing. Anyone else have this problem? How do I fix it?

    Hi,
    There may be two issues you have to check:
    1) The " scratch disk" feature in photoshop(usually gets full). Go to preferences - performance. Also check how much RAM PS is using.
    2) Printer Communication: sometimes Photoshop is unable to communicate with the default printer(may be unstable drivers, out of date etc). Network computers also make some issues
    If you want to read more about this follow this link:
    http://www.fluther.com/disc/22453/photoshop-cs3-not-opening-more-than-one-image-at-a-time/
    They talk about the issues I mentioned here. Let me know if you found this information useful.
    Vicente Tulliano

  • I started working for ChaCha, and now firefox will not work unless I manually close it in the process tree every time I want to use it. I also cannot open more than 1 page at a time.

    I started working for ChaCha 11/26/2010, I had to download a program to take incoming questions.
    Ever since then, Firefox will not work correctly, even if I am totally logged out of ChaCha, and the page is closed, if I try to open my browser using Firefox, it will not open, I have to go into the processor tree and manually end Firefox, then it will work, but it will only let me open 1 page at a time. For example I have Firefox open now, but if I go and click on the icon to open it in a new browser, it will not open, I either have to close this, or use IE-I HATE IE lol.
    I cannot use the ChaCha add on you have because it is not for the new version of Firefox, please help, I love Firefox, but not being able to open more than one window/page at a time does not cut it, nor does having to manually stop it from processing. I have tried re-installing it too.
    Thank you, Melinda

    I should add that I face the same problem with Safari and Google Chrome.

  • CS3 Crashes When trying to open more than 1 file

    Hi All,
    My work copy of CS3, Photoshop in particular, is crashing every single time I try to open more than one file. I tried trashing the preferences when using WinXP. We couldn't get it to stop crashing upon opening more than 1 file regardless of the open method (Recent docs, File>Open, Drag & Drop, etc)
    So then I actually got a new computer (bonus!) and there's Vista Ultimate on it. All was working great until this morning and now sure enough if I try to open more than one file, CRASH...
    Does anybody have any ideas on how to fix this? It must not be my machine because I've tried two machines..
    Any help is appreciated! Thank you!

    If your still running vista Click on control and switch to classic view. Look for folder options. On the View tab look for hidden files and folders and select "Show hidden files and folders". Same tab Uncheck " hide protected operating system files".  Hit APPLY then ok and close out.This will now show all files on your system.
    Right click on my computer and select properties. Click on advance system properties. Click on advance tab. Look for Performance and click on settings.
    On the advance tab look for Virtual memory and select "Change" If you only have on hard drive you should see C drive. what you want to do is select "Custom size". Look for recommended file size (mine reads 12285 MB) What you want to do is put that number size in "Initial size" and Also "Maximum Size" and hit the "set" button. What this does is it lets Vista set a set amount of Virtual memory that can be used as RAM. This will help Vista from wanting the same Hard disk space for Virtual Memory and Adobe Scratch Disk Space doing the same thing. You will have to reboot.
    Go to start and type in msconfig and hit enter. Go to Start up tabe and uncheck any start up items that do not need to start when you start your computer. While your in that area you can click on the boot tab. Click on Advance options. Look for number of processors and check the box. If you have more then one core processor click on the down arrow and look for the number of processors you have. (for example I have 4 so I selected 4. Hit ok. Then in the other main window hit apply then OK. A screen will pop up telling you to reboot. Selecting more then one processor (if you have more then one) will allow the computer to boot using all processors and maybe notice a faster boot time.
    Did you patch CS3 after you installed it on Vista? Also did you defrag your hard drive?

  • Firefox won't let me open more than one window at a time. how do i fix the problem

    Firefox won't let me open more than one window at a time. It use to allow me to open multiple windows before but for no apparent reason it stopped. I uninstalled it and re-installed but I'm having the same problem. How do I fix the problem
    == This happened ==
    Every time Firefox opened
    == several days ago

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

Maybe you are looking for