Tomcat sometimes doesn't render the page and shows plain HTML - apache

I have a J2EE App and I've been running it for a couple of years...
recently there's chance that whatever page I want to visit, it may show up as just Plain HTML and may not be rendered...
No Logs are written about this behavior as if it's a normal thing...
usually I click to visit a page, the Browser shows some cue about sending the request to the server... I can check that everything works just fine back there... Now there's 2 ways I can see this error :
1. I wait and wait and wait... and the browser is still waiting for a response... If I lose patience and press F5, the page shows up as PlainText HTML.
2. I wait till the end and the Browser may or may not load the page... if it loads the page, it's only partial and some parts of the Javascript or HTML may not load at all.
Pressing F5 usually fixes the problem but after a while, this may happen again...
This used to happen with Tomcat 6.x every once in a while but became worse after using Tomcat 7.x .
at first I thought it's related to my App but then I noticed this pattern happening even in Tomcat's own Admin pages such as its Session Manager.
What can I do ? I'm using Tomcat 7.0.54. upgrading it to newer versions didn't help...
Thank you...

Related

Chromium on startup behavior is different that launching it manually

I have a Jetson Nano that runs LXDE. After booting it should automatically start Chromium in kiosk mode and launch a web page. The web page is very simple, just adding and removing some rectangles or images based on web socket messages.
Since sometimes the DOM gets updated, sometimes not, I thought my web page has some bug. But this behavior is only on the Jetson Nano. Furthermore, when I launch the Chromium manually with the exact same parameters, I have no problem at all, everything runs as expected.
I also observed that the Chromium (the autostarted one) instantly updates the DOM correctly when I press Alt+Tab (since it is the only application, no application is really switched). So apparently nothing has happened since the last web socket message, I just press Alt+Tab, and the web page instantly is displaying the correct things. Additionally it is very difficult to bring up the developer console, pressing ctrl+shift+i for several minutes, when you are lucky it fires up the developer console. Once it is there, the web page is again working normally.
I have no idea what I can do about it. I just want to launch the Chrome so it behavior is like when I start it normally.
Currently, the autostart is done inside ~/.config/lxsession/LXDE/autostart with the line #/home/agx/dev/autostart/chromium.sh, this file is:
#!/bin/bash
sleep 60
chromium-browser --new-window --password-store=basic -kiosk --js-flags='--jitless' http://192.168.1.50/index.html
I tried to delay the start hoping it would help but it changed nothing. Same for jitless. I can execute exact this command manually in the console, chromium fires up and behaves normally.
How can I trace this one down?

Web-app not available on every 10th call

I have an odd problem. My Web-app is not available on every 10th call or so, if i click refresh its again available.
If i keep hitting the refresh button, sometimes it shows me again that my Page is not Available. I'm getting HTTP Status 404.
Does anyone know where the problem is ?
There wasn't a error with my Code. I deleted the Web-apps from "work/cathalina/localhost" and restarted Tomcat and now everything is working fine.

Why even simple pages like phpinfo is cut off on specific server?

On one of my clients production servers (Linux, Apache, PHP5) simple page output is returned partially and only to Google Chrome.
For example, I have set up simple phpinfo page, like <?php phpinfo(); ?>
When I call that page like http://192.168.1.1/phpinfo.php on IE or FireFox it nicely returns whole phpinfo page.
But when I open this page in newest Google Chrome (v.30) it gets cut off at some point. Sometimes it's after 1-2 "screens", when I hit F5, it reloads longer chunk - 5-6 "screens" long, but still not all. If I hit F5 again, it returns 2-3 "screens" long page and so on.
Any ideas what's the problem here? Opening, closing Google Chrome don't help. Cleaning temporary files don't help. I have no more ideas :(
EDIT: Added screenshots to demonstrate this issue more clearly.
1) Opening phpinfo page in Google Chrome:
you can instantly see that page is much to short for phpinfo
2) scrolling to the bottom and you can see that it's only part of phpinfo page
3) now pressing F5 to reload page
4) as you can see - page is much longer now
5) but still not full php info page
6) Also I see error in Google Chromes console like this
7) and here is all request headers (sent / received)
EDIT 2:
In FireFox page almost always loads as full page, but not always. Sometimes it also gets cut off. Only difference with Google Chrome is that in FireFox page always loads for at least 90%. In Chrome I sometimes even get page with only 5% of content in it.
Step 1: What does the log say? Can you turn up logging in apache, and tail the log for segfaults or other issues?
What happens with a long static html page (avoiding the PHP engine). php -i > ./test.txt, then grab that page with the browser.
If you view source is the entire page returned (maybe a custom style sheet is causign issues, or a proxy), or is it being truncated as well.

Why are iframe uploads so slow?

Is there a reason server-side or client-side why uploading even a tiny file via the iframe method can take such a long time?
I'm just trying to upload a file via an iframe so the user doesn't have to leave the page. It all works but it's incredibly slow. Oddly enough, one time in umpteen, it will actually go through quickly. I'm not sure what's going on.
Browser is Firefox 3.6. Server is CentOS 4 with HTTPd 2.0.
My bad, turns out the code I got from elsewhere was submitting using the same form which in this case was very large. It made the browser compile everything for submission just for the upoad. And the server-side process had to decompile all of that on its end, too. Combined, I guess that's why it was slow.

My server intermittently won't serve pages to Safari 4... Need help!

I just upgraded my browser to Safari 4 and find that our website is having some major issues specific to that browser version. As I click through pages on our site it takes one or two clicks before the browser window simply goes blank. When the window goes blank, there is no source to view and no matter how many times I try to reload or if I try to load other pages of the site, I still get the blank window. It's as if the server takes the request and simply returns a blank page.
If I wait over 15 seconds and then hit refresh again, the page loads fine. Not sure why it starts working again... Maybe a cache issue???
It's a PHP site and I've tried turning on error_reporting(E_ALL);, but that doesn't give any information. I also tried putting an echo statement at the very beginning of the index.php file and verified that the page still goes blank without echoing that statement, so I'm thinking the problem is not php code specific. The Apache error log does not show any issues. I have the same site on my local development server and it doesn't have the problem.
Safari 4 is the only browser that shows this problem. Does anyone have any ideas how to debug/fix this?
My webserver is ubuntu Hardy running Apache 2 an Mysql 5.
We have an nginx load balancer in front of the apache server and I just figured out that Safari 4 requires the nginx keepalive_timeout setting to be 0. Took all day to figure that one out...
I've been having the same issue with Safari 4 on my site but found that when reloading pages that return blanks, the request never even makes it to the server. No entry shows up in Apache's logs.
The keepalive setting for your LB sounds like a direction I could sniff in. Not sure what leeway I will have though, being on shared hosting.
Mike
This looks to be a safari bug. We experience it too, and I have read other reports.
http://discussions.apple.com/thread.jspa?threadID=2064488&start=0&tstart=0