Inexplicable delays in browser-to-servlet-to-browser communication

We are seeing some inexplicable "pauses" in the round-trip from
browser-to-servlet-to-browser communication. The browser and Weblogic
instance are on different machines, so correlating absolute times has
been difficult. So at this point it's hard to tell whether the browser
request is not being received immediately by the servlet, or the servlet
response is not being received immediately by the browser... or perhaps
it is, but maybe the response stream isn't "closing" properly, causing
the browser to think there's still more to come.
If the browser request is not being received immediately by the servlet,
it could be because the execute thread count is so low that the request
is being blocked until a thread is availble to service it. But our
thread count is set to 30 and this is with just a single user hitting
the servlet.
If the servlet response is not being received immediately by the
browser, or is not being closed properly, what could cause that?
Occassionally, I have been able to account for some of the "delay"
time. Our servlet does the usual stuff: writes out to the response
writer and then closes the writer:
PrintWriter writer = response.getWriter();
writer.write( htmlString );
writer.close();
I have seen the writer.close() method taking a long time - over 5
seconds on one occassion! What could it be doing?
Could some type of TCP_NO_DELAY network setting account for all of
this? Any and all help/experiences are appreciated.
mg
Mike Gorman, Director of Architecture
YOUcentric, Inc.
Charlotte, NC
704-643-1000 x518
http://www.youcentric.com

If you are using 5.1 and you have ELF turned on (see docs).
You can specify "time" as an ELF header and this gives you the time of
processing and the write.
mbg
In article <[email protected]>, [email protected] says...
Here are a few top of the head suggestions:
1. You can log the time when the request is received by the servlet and
when the output stream is closed. That should give you a fair idea of
what percentage of delay happens on the servlet side.
2. Try flush() to send stuff to the browser after every few lines of
write(). It helps.
3. IE does wait for the whole HTML to come in before it displays unlike
Netscape which shows the streaming data. So switch browser and check.
4. Make sure you are not using the SingleThread model even though that
does not explain the delay encountered by a single user.
If these do not help, you would need to give more insight into the code.
- Anshum
Mike Gorman wrote:
We are seeing some inexplicable "pauses" in the round-trip from
browser-to-servlet-to-browser communication. The browser and Weblogic
instance are on different machines, so correlating absolute times has
been difficult. So at this point it's hard to tell whether the browser
request is not being received immediately by the servlet, or the servlet
response is not being received immediately by the browser... or perhaps
it is, but maybe the response stream isn't "closing" properly, causing
the browser to think there's still more to come.
If the browser request is not being received immediately by the servlet,
it could be because the execute thread count is so low that the request
is being blocked until a thread is availble to service it. But our
thread count is set to 30 and this is with just a single user hitting
the servlet.
If the servlet response is not being received immediately by the
browser, or is not being closed properly, what could cause that?
Occassionally, I have been able to account for some of the "delay"
time. Our servlet does the usual stuff: writes out to the response
writer and then closes the writer:
PrintWriter writer = response.getWriter();
writer.write( htmlString );
writer.close();
I have seen the writer.close() method taking a long time - over 5
seconds on one occassion! What could it be doing?
==================================================
NewsGroup Rant
==================================================
Rant 1.
The less info you provide about your problem means
the less we can help you. Try to look at the
problem from an external perspective and provide
all the data necessary to put your problem in
perspective.

Similar Messages

  • PDF ligature display delayed in browser

    I am having problems with ligatures in a pdf displaying correctly in my browser. I would love some insight as to what is causing this. Here are the details:
    PDF exported from InDesign CS3 > Uploaded to website > Click on link to open > PDF displays immediately except for the letters "ff" (Mercury Text G1).
    This occurs in IE 8, Google Chrome, and Firefox. Also, when I open the PDF directly in Adobe Acrobat there is no delay.
    Thanks!

    I'm having the exact same issue. Can't find an answer anywhere yet.

  • Bridge Delaying Dreamweaver Browser Preview

    I have noticed that when Adobe Bridge is open, Dreamweaver
    CS3 has trouble previewing in my Firefox browser (have not tried
    other browsers). When I preview, the hour glass appears for 20-30
    seconds and then, finally the preview appears in the browser.
    With Bridge closed the preview displays immediately without
    delay.
    I like to work with Photoshop, Bridge, and Dreamweaver open
    at the same time so it is kind of a slow down to have to close
    bridge when I do a lot of previews (and I do A LOT of previews).

    Same problem in IE7 preview as well. Running Windows XP SP2
    Other apps can be open (such as After Effects or Premiere
    Pro) with no problem. I only get this with Bridge running.
    Open Dreamweaver, Photoshop and Bridge. Then use the browser
    preview globe button in Dreamweaver to preview to a browser. If you
    don't get a long delay, then I have something else going on I
    guess.

  • Beachball delay when browsing loops

    Could anyone offer me any advice?
    In short, when I browse the loop area (i.e. clicking about the place evaluating sounds and loops), there is a large delay and the horrific beachball of death appears (usually lingering for about 2 minutes).
    When this occurs, the whole computer seems tied up trying to find or play the specified clip.
    Well, anyway, I could do without this happening as it's very frustrating.

    Hello and Welcome to Apple Discussions ...
    *"The error is present on all drives, main drive and external drives."*
    Try deleting the Finder preference file from your home folder.
    com.apple.finder.plist /Users/YourName/Library/Preferences. Drag that file from the Preferences folder to the Trash, empt the Trash and reboot. See if there is still a delay issue.
    If there is... probably be a good idea to check the Mac hard disk for errors.
    Open Disk Utility, in the Utilities folder in the Applications folder.
    Select your disk, and click First Aid.
    Click Verify Disk.
    If the disk needs repairs, do one of the following:
    Insert your Mac OS X Install disc in your computer’s optical drive or an optical drive connected to your computer, and then restart your computer. When you hear the startup tone, hold down the C key until you see the progress indicator, which looks like a spinning gear.
    Follow the onscreen instructions until the menu bar appears with the Utilities menu in it, choose Utilities > Disk Utility, click First Aid, and then click Repair Disk.
    Restart your computer using Remote Install Mac OS X. Follow the onscreen instructions until the menu bar appears with the Utilities menu in it, choose Utilities > Disk Utility, click First Aid, and then click Repair Disk.
    Checking a hard disk to see if it’s going to fail
    You can check the health of your hard disk by checking its Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T.) status in Disk Utility. Most disk drives include S.M.A.R.T. hardware. Developed by IBM, S.M.A.R.T. hardware allows hard disks to test themselves for potential problems.
    Carolyn

  • Delayed web browser connection...

    I use a verizon wireless broadband to get internet through my Powerbook G4. I then share the G4s internet connection to my G5 through ethernet. This was working no problem, and at a decent speed.
    I upgraded my quicktime and 10.4.7. I had significant problems with my G5. After a few reinstalls and then upgrades, in combination with running disk utilities, things are working, but my internet is giving me problems on my G5. When I connect, either through a web browser, or FTP, to an internet site, it will time out twice. Once I hit refresh the second time, the page will load quickly without a problem.
    I can't think of the problem, I've turned off firewalls on my G5, and tried to disable whatever else I can think of. I have used 4 different browsers (firefox 1 and 1.5, IE, Safari) and had the same results. When I check the internet connection on the G4, its working perfectly.
    AND when I share the connection through firewire, rather than ethernet, i have the same result, of the slow internet and necessity to connect several times before it works.
    please, anyone?

    ...any thoughts guys? Or does this sound more like an OSX issue?

  • JWS to browser communication?

    Can I exchange information between JavaScript and a JWS application lauched from the same browser session? Scenario would be as follows:
    1) Enter URL of web page from browse.
    2) Web page displays in browser with a button which will lauch a JWS application. Would like to pass parameter data to JWS application when lauched.
    3) Upon existing JWS application, any return values are passed back to browser (hoping JavaScript could read return values).
    4) Display return values within browser page (same page if possible).
    Please let me know if this is possible or at least some variation (JSP, servlets, etc). Also, please don't ask me about using applets. Just assume I can't use them.
    Thanks for any help,
    SLS

    since javaws is launched as a helper application, this is not possible.
    when javaws is invoked it has no knowledge of the browser that invoked it (if one did).
    /Dietz

  • Flash Player and Browser Communication

    According to this article:
    http://blog.dannypatterson.com/?p=133
    Compressed data (gzip files) being sent from the server are
    unzipped by the browser before being passed to Flash Player -
    therefore there is no need to write separate action script classes
    to deal with the data.
    I am getting conflicting reports from other developers saying
    that the Flash player communicates directly with data coming from
    the server with no stop at the browser level. According to them,
    you must write actionscript classes to decompress the data.
    Who is right?

    If you want to report Flash Player bug, right location is here. If you report ActionScrit bug, JIRA is right place though.
    By the way I belive this is not bug but expected behavior. I'll follow up more info in Flash Player forum: http://forums.adobe.com/thread/920682?tstart=0
    thanks,
    Hitomi

  • Applet-Browser communication

    I have an applet that runs inside one frame of a two frame browser window. As far as I can tell from the JDK documentation, the only way an applet can interact with the browser is the requests for displaying particular pages e.g.using the showDocument() method in the AppletContext interface class.
    What I want to be able to do is to highlight particular text in the browser frame from the applet. Is this possible? Does anyone know of anyone free libraries that have implemented such functionality?
    Any ideas appreciated.

    I don't think that's possible.
    but if the HTML-pages are simple (no scripting, no frames etc..) you
    can use JEditorPane to show the HTML-pages instead of the browser and you have all the control you wish.

  • Java and native browser communication

    Hello all,
    I am working on a project that parses an HTML document and retrieves specified data. This module of the app is complete. The app can easily read a URL specified by the user, but the contents of some URLs will of course be different when viewed through a browser due to cookies etc.
    Thus, I am trying to access the same HTML doc that a native browser is displaying (ie the same data that is shown upon "view source"). Does anyone know of a way to do this? Thanks in advance!
    derek

    DrClap wrote:
    derekn wrote:
    Thanks Chuck!
    I presently have a similar implementation which reads the HTML at a URL just fine. However, I essentially want to synchronize my app with the actual HTML that is displayed in a native browser. The reasoning behind this is that the browser will of course do redirects, automatic logins etc. at certain URLs due to cookies and such. It is impractical to attempt to mimick these actions in my app and hope to get the same HTML that the native browser is displaying, so instead I am trying to access the same data. Any thoughts?Okay. So you know what has to be done. If your question is then how to hack into the browser instead, and get it to disgorge its data, good luck to you. It isn't really impractical to handle cookies and redirects and basic authentication logins, though.After researching, I think the best thing to do will be to just embed a fully functional browser in my app using JDIC or a similar technology. Microsoft and Mozilla provide embeddable versions of their browsers. Because you're right, I would essentially have to hack a browser to access that data.

  • MacBook Pro Safari Browser Community Toolbar Problem

    Everytime I open Safari on my MacBook Pro the following message appears:
    'We’re sorry, but the Safari browser version you are currently using does not support the community toolbar.'
    I have to acknowledge it before I can go online, very annoying!!
    Any fixes for this would be appreciated

    Follow the paths...
    /Library/Application Support/   Move the Conduit file to the Trash.
    /Library/Application Support/   Move all of these files to the Trash: SIMBL/Plugins/CT2285220.bundle
    /Library/InputManagers/  Move CTLoader to the Trash.
    /Library/ScriptingAdditions/ Move any Conduit / CTLoader related files in that folder to the Trash.
    /Users/<User name>/Library/Application Support/   Move Conduit to the Trash.
    Restart your Mac, empty the Trash, try Safari.

  • Unattended Browser Communicating More than Expected

    FireFox 23.0 is communicating over the Internet while my computer is unattended and the browser is open to just one ordinary Web site (a single satellite image from http://www.ssec.wisc.edu). The following data come from the LAN Connection Status on my XP SP3 computer with the assumption that one "packet" = 1500 bytes:
    Overall data rates are about 3.23 MB/hr up and 4.58 MB/hr down (averaged over 2 hr 17 min) with Firefox open. With Firefox closed I'm showing only about 0.12 MB/hr up and 0.050 MB/hr down (averaged over 4 hr 22 min), which I presume can be attributed to Windows.
    Question: Is this level of "chatter" reasonable, given FireFox's desire to update itself, it's databases, and its plugins (I have read https://support.mozilla.org/en-US/kb/how-stop-firefox-automatically-making-connections?esab=a&s=automatic+reload&r=3&as=s; no live bookmarks, newsfeeds, etc. are set up), or is this in itself a cause for concern? I have no other obvious symptoms of infection. The above data result solely from my own curiosity about how much bandwidth I was using.

    OK, Thanks. I have a log. Now I just have to learn how to read and make sense out of it! Any suggested references? --JCW2

  • Servlet Applet object communication problem???!!!

    Hy folks,
    I need to validate the ability of complex Servlet Applet communication an run into my first pb right at the beginning of my tests. I need to have around 200 Applet clients connect to my servlet and communicate by ObjectInput and ObjectOutput streams. So I wrote a simple Servlet accepting HTTP POST connections that return a Java object. When the java Applet get instantiated, the Object Stream communication workes fine. But when the Applet tries to communicate with the servlet after that, I can not create another communication session with that Servlet, instead I get a 405 Method not allowed exception.
    Summarized:
    - Applet init() instantiate URLConnection with Servlet and request Java object (opening ObjectInput and Output Stream, after receaving object, cloasing streams).
    - When I press a "get More" button on my Applet, I am not able to instantiate a new URLConnection with my servler because of that 405 exception, WHY???
    Here my Servlet code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
             ObjectInputStream inputFromApplet = null;
             ArrayList transmitContent = null;       
             PrintWriter out = null;
             BufferedReader inTest = null;
             try{               
                   inputFromApplet = new ObjectInputStream(request.getInputStream());           
                     transmitContent = (ArrayList) inputFromApplet.readObject();       
                     inputFromApplet.close();
                     ArrayList toReturn = new ArrayList();                 
                     toReturn.add("One");
                     toReturn.add("Two");
                     toReturn.add("Three");
                     sendAnsweredList(response, toReturn);                 
             catch(Exception e){}        
         public void sendAnsweredList(HttpServletResponse response, ArrayList returnObject){
             ObjectOutputStream outputToApplet;    
              try{
                  outputToApplet = new ObjectOutputStream(response.getOutputStream());          
                  outputToApplet.writeObject(returnObject);
                  outputToApplet.flush();           
                  outputToApplet.close();              
              catch (IOException e){
                     e.printStackTrace();
    }Here my Applet code:
    public void init() {         
             moreStuff.addActionListener(new ActionListener(){
                  public void actionPerformed(ActionEvent e){
                       requestMore();
             try{
                  studentDBservlet = new URL("http://localhost/DBHandlerServlet");              
                  servletConnection = studentDBservlet.openConnection();      
                   servletConnection.setUseCaches (false);
                   servletConnection.setDefaultUseCaches(false);
                   servletConnection.setDoOutput(true);
                   servletConnection.setDoInput(true);
                   ObjectOutputStream outputToApplet;
                 outputToApplet = new ObjectOutputStream(servletConnection.getOutputStream());          
                 outputToApplet.writeObject(new ArrayList());
                 outputToApplet.flush();           
                 outputToApplet.close(); 
                   ObjectInputStream inputFromServlet = new ObjectInputStream(servletConnection.getInputStream());
                   ArrayList studentVector = (ArrayList) inputFromServlet.readObject();
                   area.setText("Success!\n");
                   for (int i = 0; i<studentVector.size(); i++) {
                        area.append(studentVector.get(i).toString()+"\n");
                  inputFromServlet.close();
                  outputToApplet.close();             
              catch(Exception e){
                   area = new JTextArea();
                   area.setText("An error occured!!!\n");
                   area.append(e.getMessage());
            getContentPane().add(new JScrollPane(area), BorderLayout.CENTER);
            getContentPane().add(moreStuff, BorderLayout.SOUTH);
        private void requestMore(){
             try{              
                  studentDBservlet = new URL("http://localhost/DBHandlerServlet");                             
                  servletConnection = studentDBservlet.openConnection(); 
                   ObjectInputStream inputFromServlet = new ObjectInputStream(servletConnection.getInputStream());
                   ArrayList studentVector = (ArrayList) inputFromServlet.readObject();
                   area.setText("Success2!\n");
                   for (int i = 0; i<studentVector.size(); i++) {
                        area.append(studentVector.get(i).toString()+"\n");
              catch(Exception e){               
                   area.setText("An error occured2!!!\n");
                   area.append(e.getMessage());
        }Can someone help me solv this issue please, this is my first Applet Servlet work so far so I have no idea on how to solve this issue.

    Sorry folks, just found my error. Forgot about the ObjectInputStream waiting on the Servlet side, so of course had a dead look...
    Sorry!

  • Problems with Servlet  to JSP communication please help!!!

    Hello All ,
    we have different web applications running
    e.g.
    We have 2 webApp named A and B are running and there URL are
    http://localhost:8080/A and
    http://localhost:8080/B
    and we have one common WebApp running at
    http://localhost:8080/common
    Our problem is that whenever a user log in to the system he/she will first call the
    common URL and then enter his user name and password
    and depending on his username we have redirect user to either A or B with his pasword and username as parameter to the request.
    i.e. in common module whenever i get userName and password we call a Servlet to authenticate the user and to detemine which webapp to forward to..
    i have to call jsp accordingly from servlet in common webApp to JSP in different webapp.
    I m wonderning how it is possilble.
    As
    i don't know how to call another webApp using
    RequestDispatcher.forward () method and
    also
    i am not able to set paramters with the request whenever i user response.sendRedirect() method
    I am wondering what could be the way to pass paramer to the request from servlet in one webApp to JSP in another webApp
    Please help its urgent!!!
    thankx in advance

    forward() can't call another webapp.
    There are several ways you could do this.
    1) Share the session object across both webapps and set something as an attribute of the session.
    2) Use a database or file storage to record the transaction, then go to the second webapp, which picks up that info.

  • Servlet Server Socket Communication problem

    Hi
    Iam having this problem ...when I read data in server line by line it works but when I try to read byte by byte server hangs. This is my code
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    clientSocket.getInputStream()));
    //it works fine when i do
    String strLine = in.readLine();
    //but hangs when I do like this
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int r = in.read();
    while(r != -1)
    baos.write(r);
    r = in.read();
    I am sending data from the client socket as
    out = new PrintWriter(addArtSocket.getOutputStream(), true);
    I just do out.println to send data.
    Is there something wrong that I am doing?
    Thanks
    vinitha

    hi,
    basically, I suggest that you have the communication
    channel in the same type between two ends. For example,
    if you decide to connect two side byt Stream, you just
    apply your code in the sort of Stream for I/O.
    If you decide to connect two sides by Reader/Writer, you
    apply your code in the sort of Reader/Writer for I/O.
    Don't mix them up. Although I don't know what may
    happen. For example, you want to pass an Object
    between two ends, you could use ObjectInputStream/
    ObjectOutputStream pair on two sides. Don't put
    ObjectInputStream in one side and talk to one sied
    which write data by other OutputStream filteer but
    not ObjectOutputStream .
    You may find something interesting.
    good luck,
    Alfred Wu

  • Servlet to applet communication: with out polling

    hi,
    i need to write an applet which captures the realtime data as it appears in the server. Is this possible with out polling ther server at constant intervals? i.e... is it possible for the server to push data to an applet (say applet first registers etc etc with the server)
    One more thing..say applet had opened a connection with server and opened a stream. Now is it possible for it to keep listening over the connection so that server puts the info over the connection when ever it has it and the client displays the info when ever it receives it.
    Any pointers would be helpful.

    [email protected] wrote:
    hi,
    i need to write an applet which captures the realtime data as it appears in the server. Is this possible with out polling ther server at constant intervals? i.e... is it possible for the server to push data to an applet (say applet first registers etc etc with the server)sure it's possible
    One more thing..say applet had opened a connection with server and opened a stream. Now is it possible for it to keep listening over the connection so that server puts the info over the connection when ever it has it and the client displays the info when ever it receives it.
    Any pointers would be helpful.i'm not sure what the best way is, but I've done it with Sockets and ObjectOutputStream

Maybe you are looking for

  • BT HomeHub3 compatibility issues with HP printers?

    Our HP Photosmart printer is connected to our wireless network, but despite the printer itself saying it has got a good signal and is connected to the correct home network, none of the computers in the house (2 Mac laptops on Mountain Lion and a PC r

  • PDF with imported video leaves outline on subsequent page

    I have an InDesign file with an imported MOV video. When I Export an Interactive PDF and open it in Acrobat X (10.1.7), the video plays fine, but when I advance to the next page, there is a remnant ghost outline in the exact location of the video on

  • IPad is locked with a pass ode

    I have bought a iPad air for my grandmother and went to set up Internet connection for her today. It's now locked with a security pass code that was never set. I have tried all suggestions on here to reset but can't connect to the Internet or unlock.

  • TS3212 Help!! My iTunes not working?

    reinstalled itunes, updated it, now itunes won't open (can not be read because created on newer verison of iTunes)

  • Awful, overexposed CS3 thumbnails

    To view my Nikon D3 files, I had to upgrade from CS2 to CS3. First they suggested I cownload the full featured trial version so I could start editing them while waiting for my DVD to arrive. I found that only one image could be more than a thumbnail.