Facing problems with URLConnection under high load

Hi,
I have a piece of code that acts as a load balancer. Under high load scenario - 200+ different simulataneous users, it throws some errors.
Following is a snippet from that code -
               URL url = new URL(site);
               URLConnection urlconnection = url.openConnection();
               urlconnection.setDoInput(true);
               urlconnection.setDoOutput(true);
               urlconnection.setUseCaches(false);
               DataOutputStream dataoutputstream =
                         new DataOutputStream(urlconnection.getOutputStream());
               dataoutputstream.writeBytes(posServiceRequest);
               dataoutputstream.flush();
               dataoutputstream.close();
               InputStream inputstream = urlconnection.getInputStream();
               httpservletresponse.setContentType(urlconnection.getContentType());
               rewriteStreams(inputstream, httpservletresponse.getOutputStream());
               inputstream.close();
Somewhere after around 200 odd users, this piece of code throws an error - "Error writing to server", a stacktrace print shows that the error occurs at the following line -
InputStream inputstream = urlconnection.getInputStream();
Any pointers would be appreciated.
Thanks,
-rahul

More information please. What is the exception class, what is its entire text, and what is the stack trace.

Similar Messages

  • I am having problems with video and high content webpages freezing.  I am also getting pixel lines across my webpages.  Maybe two or three lines.  I was running os 10.4 but I just up graded to 10.6 the other day.  I have 2GB of RAM.

    I am having problems with video and high content webpages freezing.  I am also getting pixel lines across my webpages.  Maybe two or three lines.  I was running os 10.4 but I just up graded to 10.6 the other day.  I have 2GB of RAM.

    Exactlly which model iMac do you have?
    see > How to identify iMac models
    Unfortunately that is not all that uncommon for the Early Intel iMac's given there age and the fact that the air intakes are probably choked with dust. Then add the extra heat caused by running a more intense OS X which is causing it to run a little warmer than normal and putting extra stress on the graphic and display components.
    My 6½ year old 17" Early 2006 Core Duo w/2GB of RAM is also running 10.6.8 and is also starting to get a single line that (knock on wood) goes away after a few minutes, while many others started getting permanent ones after 2 or 3 years. One thing that I think has helped, is that about every 3 or 4 months I shutdown and vigorously vacuum out the bottom grill work and small vent under the stand to keep it running cool.
    On that note: unfortunately I can only suggest that you clean your intake vents and hope that no permanent or irreversible damage has been done.

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

  • Problems with ViaVoice under Leopard, especially key mapping problems

    ViaVoice's behavior has changed considerably under Leopard. First I will discuss the key mapping problem, since I'm eagerly looking for an answer to this problem. At the end of this post, I will voice some of the other problems I've experienced for those who may be interested. The key mapping problem may be specific to the fact that I use a foreign keyboard with a US version of ViaVoice.
    INTRO:
    I have used ViaVoice on my Mac for years, more or less without problems (ViaVoice's bugginess is notorious).
    Those who know ViaVoice will know that one has two general options for dictation. One can dictate into ViaVoice's so-called SpeakPad, which allows special formatting, editing and dictation error correction within the dictated text, or one can dictate into "external" software such as Microsoft Word, in which case ViaVoice just sends a string of characters to that software. SpeakPad appears to make strong use of the operating system's built-in functionality for character formatting, document formatting, etc.
    *MY PROBLEM*
    I have a German keyboard on my PowerBook, yet dictate in US English. When I dictated into SpeakPad under Tiger, all characters appeared correctly. However, when I dictated into Microsoft Word using Tiger, I had to switch the keyboard mapping from German to US to get all characters (that means including the characters that are located at different positions on a German keyboard than they are on a US keyboard such as y, z, apostrophes and parentheses) to appear correctly.
    Under Leopard, things have changed. Now it doesn't matter whether I dictate into SpeakPad or Word; the results are the same and many characters do not appear correctly.
    If set to a German keyboard, y and z appear as expected. To name a few irregularities:
    "(" appears as ")"
    ")" appears as "="
    apostrophes appear as "#" and
    ";" appears as ","
    If set to a US keyboard, y and z are interchanged. "(" and ")" appear as expected. Apostrophes appear as "\" and ";" appears as ","
    By comparison, if typed (as opposed to dictated, as in the examples above) "correctly" (i.e. based on the letters printed on the keyboard) on a German keyboard set to imitate a US keyboard:
    y and z are interchanged
    apostrophes appear as "|"
    "(" appears as "*"
    ")" appears as "(" and
    ";" appears as the symbol for "less than"
    Since I don't have a US keyboard, I can't say how it would behave if set to imitate a German keyboard, i.e. if there's a correlation to the results I get when I dictate.
    Since I was previously able to dictate correctly into SpeakPad by setting the keyboard to "German" and into Word by setting the keyboard to "US," I presume that this is a problem in Leopard, not ViaVoice.
    *OTHER PROBLEMS WITH VIAVOICE UNDER LEOPARD*
    In addition to the aforementioned key mapping problems (that may be specific to those of us with foreign keyboards), ViaVoice appears to have lost considerable functionality in Leopard. I cannot access SpeakPad's Preferences and the correction window. Moreover, the traffic-light like window buttons have disappeared from the VoiceCenter (although they work if you click where they should be). SetupAssistent appears to function.
    I've written to Nuance about these problems, but have little hope that they will invest the time in producing a patch since they haven't released any updates since 2003.

    Thrums1,
    I've never had to "register" ViaVoice after updating the system. I thus suspect you haven't fully followed my above, three-step advice (particularly step 3).
    1) Reinstall ViaVoice from CD.
    2) Update to the latest version (using the patch downloadable from Nuance's website).
    3) Replace the “temp” and “users” folders (in the "ViaVoice" folder at the upper level of your home directory) by a previous copy thereof. When I say previous copy, I mean a copy from when ViaVoice was still working properly, e.g. a copy from when it was running under Tiger.
    As I said, I've gotten ViaVoice to survive several system updates by following the above steps. To my knowledge, the last step is critical since it saves you from having to reconfigure ViaVoice under the new operating system (in this case Leopard). I suspect that ViaVoice is crashing on your system because it's trying to start some module of the SetUpAssistant that is incompatible with Leopard (as many are). If you instead use old copies of the "temp" and "users" folders (from the previous system), then ViaVoice doesn't have to go through the initial "registration" process; ViaVoice doesn't need the SetUpAssistant; and all is (more or less) fine.
    Good luck!
    BTW, to my knowledge, Dictate only runs on Intel Macs. It thus won't run on a G4 iBook, just as it won't run on my PowerBook G4.

  • Problem with clob_write under client 9.2.0.6: UnsatisfiedLinkError

    Hi all,
    I'm running Oracle client 9.2.0.4 on Windows XP and Java 1.4.1_3.
    Writing or reading clob's works pretty well.
    As i tried to update to Oracle client 9.2.0.6, i got the error
    Communication failed: java.lang.UnsatisfiedLinkError: clob_write when i tried to write a clob. The same error appears when i tried to read a clob.
    Is there a specific problem with clobs under this client?
    All other JDBC operations work as good as before.
    Thanks.

    Here is another hint.
    In your classpath, use the jdbc driver that's under your oracle installation to which you are trying to connect to (ie, <ORACLE_HOME>\ora92\jdbc\lib\ojdbc14.jar).
    I had the same problem in 9.2.0.6 and its gone when I replaced the ojdbc14.jar. I copied the ..\ora92\jdbc\lib\ojdbc14.jar to my java client program's classpath, and ran the java client without getting the UnsatisfiedLinkError.
    It looks like the ocijdbc9.dll under ora92\bin has to match correctly with the jdbc drivers you would be using. I got this idea from this link:
    http://episteme.arstechnica.com/groupee/forums/a/tpc/f/6330927813/m/705001068631/inc/-1
    Hope this helps.

  • Facing problem with a date column in select query

    Hi,
    I am facing problem with a date column. Below is my query and its fainling with " invalid number format model" .
    Query: SELECT *
    FROM EMP
    WHERE trunc(LAST_UPDATED) >= to_date(to_char(22-05-2009,'dd-mm-yyyy'),'dd-mm-yyyy')
    LAST_UPDATED column is "DATE" data type.
    Please help me Thanks

    Radhakrishna Sarma wrote:
    SeánMacGC wrote:
    WHERE LAST_UPDATED >= to_date('22-05-2009','dd-mm-yyyy');
    You do not need the TRUNC here in any case.
    I don't think so. What if the user wants only data for 22nd May and the table has records with date later than 22nd also? In that case your query willl not work. In order for the Index to work, I think the query can be written like this I think Sean is right though. Use of TRUNC Function is quiet useless based on the condition given here, since the to_date Function used by OP will always point to midnight of the specified date, in this case 22-05-2009 00:00:00.
    Regards,
    Jo
    Edit: I think Sean proved his point... ;)

  • I am facing problem with adobe illustrator cc in windows 8,it closes automatically after few secons,please help

    I am facing problem with adobe illustrator cc in windows 8,it closes automatically after few secons,please help
    [ link removed by moderator ]

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • Newbie to blackberry...facing problem with basics

    hi guys,
                 i got my playbook today...........facing problem with basics
             1.how do i perform file actions(like create folder, move,rename)
             2.cant  use drag gesture
             3. ppt applications doesnt show a option to create new presentation(word and xls apps seem to work fine)
             4.can we even download apps from app world to pc  bcuz  everytime it says connect the smartphone to computer even though its physically connected and blackberry desktop manager also shows the device is connected"

    To mange your files, try a file manager like Files & Folders.
    Drag gestures are available in OS 2.0 which should be available before the end of Feb (rumour has it, this week).
    In OS 2 you will also be able to create new PPT presentations.
    To download apps from App World you need to be connected to a Wifi network at the moment.
    Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands

  • I have ipad 2 and facing problem with programs swtching off

    I have ipad 2 and facing problem with programs it's swtching off while working and turn to home page. Am using ios 5

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Urgent: Facing problem with restoratio​n prosses

    Good day,
    I'm Facing problem with restoration process. During restoring my data from my PC to my Q10 phone using link app. the application reject my request & kept giving me following error:
    Operation Cancelled.
    Really need your help Gent’s & I'll be so much glad for anyone help me to solve this matter.
    Thx.

    Hello
    Are you restoring from same device to same device or to different device?

  • Sim problems- I updated my ipad2 to ios7 after that , iam facing problems with my sim, it showing no sim card after inserting sim. there is no prbolem with my sim.

    I updated my ipad2 to ios7 after that , iam facing problems with my sim, it showing no sim card after inserting sim. there is no prbolem with my sim.

    arun kumar chenna123 wrote:
    i have updated my iphone to ios4.1. after installation, it is showing as"The SIM card inserted in this iPhone does not appear to be supported. only compatible sim cards from a supported carrier may be used to activate iphone. Please insert the sim card that came with your iphone...."
    how to solve this problem. I don't have any sim cards that came with iphone.
    Please help out to solve this problem.
    It sounds like the phone was hacked or jailbroken, and updating it locked it to the original carrier. As it is not possible to update to any version other than the current one (5.1) the fact that you updated to 4.1 pretty much confirms the phone was hacked. There is no solution that you can get in an Apple forum.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • Adobe aftereffects is not working on os x maverics all updates...... is dis soft. will work on the new os x yosemite.??  y apple is nt working on dis problem wen users are facing problems with new os x .....

    Adobe aftereffects is not working on os x maverics all updates...... is dis soft. will work on the new os x yosemite.??  y apple is nt working on dis problem wen users are facing problems with new os x .....

    I suggest you contact Adobe tech support or their Mac forums for assistance.

  • HT1222 I have iphone 4 and the software is ios 7.0.2. I am facing problems with my phone. Since the last software update my phone has started giving problems. like it hangs sometime when i recieve an incoming call. The carrier status bar shifts down a bit

    I have iphone 4 and the software is ios 7.0.2. I am facing problems with my phone. Since the last software update my phone has started giving problems. like it hangs sometime when i recieve an incoming call. The carrier status bar shifts down a bit and sometimes it vanishes automatically. I,m confused.
    Secondly i have an update IOS 7.0.4 waiting in my Software Update menu. I have tried so many times to update my iphone but it always fails to update the IOS 7.0.4. Any body suggest anything regarding this

    Wow. Lots of help. Thanks apple

  • Facing problems with network due which the phone goes into hangs status

    Facing problems with network due which the phone goes into hangs status.  some one help me with switching between 2g and 3G network

    Hi Mani Nair,
    I apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are talking about having issues with a 3G cellular data network, you may find the troubleshooting steps outlined in the following article helpful:
    iPhone cellular data connection issues
    Regards,
    - Brenden

Maybe you are looking for