Forum Moderators: phranque

Message Too Old, No Replies

Apache Performance issues

         

iffarrukh

2:58 am on Mar 3, 2011 (gmt 0)

10+ Year Member



Hi

I am getting a weired problem. We one server running on Virtuzzo oN RHEL 3 with apache 2.0. There is a website hosted on server. What is does is open a login page, you click login page then it load an Java applet and connect to another server of another country and then display a login page. After this this website work is finished. As user login and connect to a java based application whose all info is coming from another country. Now we migrated machine from virtuozzo to vmware.. Now machine is RHEL 5 with apache 2.2.

WHen user click on login.. popup comes up but it takes a looog time to display login window and most of the user just stuck on pop up and there is no initialization of login page. I supposed it was not this server problem as applet connect to another server for login page.. But due to not able to see login windows. I have to revert server back to Virtuozzo and all work fine...
Any idea.. Code is show below. Any help/ideas would be highly appreciated.

First this page is opened then rediected to another page..

---------------------------------------------------------------------

<html>
<head>
<title>WARP Browser System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function popup(url,name){
properties = "";
window.open(url,name,properties);
}

//-->
</script>
<!-- Internet Explorer -->

<SCRIPT language="VBScript">
<!--

Function chkplugin
window.open "../../index03.html","","scrollbars=no,menubar=no,status=yes,directories=no,location=no,toolbar=no,resizable=yes,width=600,height=130"

End Function

-->
</SCRIPT>



<!-- Netscape Navigator/Communicator -->

<COMMENT>

<SCRIPT language="JavaScript">

function chkplugin(){

window.open("../../index03.html","","scrollbars=no,menubar=no,status=yes,directories=no,location=no,toolbar=no,resizable=yes,width=600,height=130");

}

</SCRIPT>

</COMMENT>



<SCRIPT language="JavaScript">

<!--

function browserchk(){

app = navigator.appName.charAt(0);

ver = navigator.appVersion.charAt(0);

info = navigator.appVersion;

//////////////////////////////////////////////////////

// Netscape 3.0 or later, Communicator 4.0 or later //

//////////////////////////////////////////////////////

if (app == "N") {

if (ver < 3.0) {

alert("Following evironment is needed for WARP.\nPlease check your browser version.\n\n[Recommended browser version]\n -Netscape Navigator 3.0 or later\n -Netscape Navigator/Communicator 4.0 or later(for Windows 98/95/NT 4.0)\n -Microsoft Internet Explorer 4.01 or later(for Windows 98/95/NT 4.0)\n");

} else{

chkplugin();

}



/////////////////////////////////////

// Internet Explorer 4.01 or later //

/////////////////////////////////////

} else if (app == "M") {

if (ver < 4.0) {

alert("Following evironment is needed for WARP.\nPlease check your browser version.\n\n[Recommended browser version]\n -Netscape Navigator 3.0 or later\n -Netscape Navigator/Communicator 4.0 or later(for Windows 98/95/NT 4.0)\n -Microsoft Internet Explorer 4.01 or later(for Windows 98/95/NT 4.0)\n");

} else {

chkplugin();

}

}

}

-->

</SCRIPT>
</head>
<body bgcolor="#E5E7E6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/WARP_CPP_Home_004_Red_05.gif','images/WARP_CPP_Home_004_Red_07.gif','images/WARP_CPP_Home_004_Red_08.gif','images/WARP_CPP_Home_004_Red_09.gif')">

<table id="Table_01" width="799" height="420" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="3">
<p>&nbsp;</p>
<img src="images/WARP_CPP_Home_004_01.gif" width="799" height="86" alt=""></td>
</tr>
<tr>
<td rowspan="8">
<img src="images/WARP_CPP_Home_004_02.gif" width="450" height="334" alt=""></td>
<td colspan="2">
<img src="images/WARP_CPP_Home_004_03.gif" width="349" height="84" alt=""></td>
</tr>
<tr>
<td>
<img src="images/WARP_CPP_Home_004_04.gif" width="162" height="99" alt=""></td>
<td>
<a href="JavaScript:browserchk();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('login','','images/WARP_CPP_Home_004_Red_05.gif',1);window.status='go to WARP';return true;">
<img src="images/WARP_CPP_Home_004_05.gif" name="login" width="187" height="99" border="0" alt=""></a></td>
</tr>
<tr>
<td colspan="2">
<img src="images/WARP_CPP_Home_004_06.gif" width="349" height="19" alt=""></td>
</tr>
<tr>
<td colspan="2">
<a href="javascript:popup('http://t90nwd.mx.toyota.co.jp/master/CPP_Master.xls','')"
onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('CPPMS','','images/WARP_CPP_Home_004_Red_07.gif',1);window.status='download CPP Master';return true;">
<img src="images/WARP_CPP_Home_004_07.gif" name="CPPMS" width="349" height="25" border="0" alt=""></a></td>
</tr>
<tr>
<td colspan="2">
<a href="javascript:popup('http://t90nwd.mx.toyota.co.jp/master/Supplier_Cross_Reference_Master.xls','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('SuppMS','','images/WARP_CPP_Home_004_Red_08.gif',1);window.status='download Supplier Cross Reference Master';return true;">
<img src="images/WARP_CPP_Home_004_08.gif" name="SuppMS" width="349" height="24" border="0" alt=""></a></td>
</tr>
<tr>
<td colspan="2">
<a href="../UserManual/main_warp_user_manual.htm" target="_top" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('UserMan','','images/WARP_CPP_Home_004_Red_09.gif',1);window.status='go to WARP Manual';return true;">
<img src="images/WARP_CPP_Home_004_09.gif" name="UserMan" width="349" height="25" border="0" alt=""></a></td>
</tr>
<tr>
<td colspan="2">
<img src="images/WARP_CPP_Home_004_10.gif" width="349" height="56" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/WARP_CPP_Home_004_11.gif" width="349" height="2" alt=""></td>
</tr>
</table>

</body>
</html>
------------------------------------------------------------------
index03.html
----------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HEAD>

<META name="GENERATOR" content="IBM WebSphere Homepage Builder V6.0.1 for Windows">

<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<META http-equiv="Content-Style-Type" content="text/css">

<TITLE>WARP Browser Check</TITLE>

<!-- Internet Explorer -->
<SCRIPT language="VBScript">
<!--
'// Get version of existing Plugin //
Function GetPluginVersion()
On Error Resume Next
Dim PluginName
PluginName = "F5CXWPIE.JBKPluginCtrlT02.1"
Dim Plugin
Set Plugin = CreateObject(PluginName)
GetPluginVersion = Plugin.version
End Function

Function chkplugin_VB()
'// When JBK Plugin is not Installed //
Dim pluginVersion
pluginVersion = 3.01
Dim CurrentVersion
CurrentVersion = 0.0
'// Get Plugin Version //
CurrentVersion = GetPluginVersion()
'// Plugin version Check //
If CurrentVersion < pluginVersion Then
Dim Msg1, Msg2
Msg1 = "You need to install the latest Java Plugin."
Msg2 = "Click 'OK' and use the Installer."
Dim ok
ok = MsgBox (Msg1 + Chr(13) + Msg2, 65, "Java Plugin")
If ok = vbOK Then
window.open "http://***************.com.au/atschen.html"
window.close
else
window.close
End If
Else
location.href = "http://*******************.com:51008/webapp/Wakeup*****/wakeupFirst.jsp"
End If
End Function
-->
</SCRIPT>

<COMMENT>
<!-- Netscape Navigator/Communicator -->
<SCRIPT language="JavaScript">
<!--
function chkplugin(){
var PLG_MIMETYPE = "application/x-JBK-Plugin.02";
// Latest Plugin check //
var MSG1 = "You need to install the latest Java Plugin.";
var MSG2 = "Click 'Java Plugin' and download the Installer.";
if (navigator.mimeTypes[PLG_MIMETYPE] == null) {
var ok = window.confirm(MSG1 + "\n" + MSG2);
if (ok) {
window.open("http://***************.com.au/atschen.html");
window.close();
} else {
window.close();
}
} else if (navigator.mimeTypes[PLG_MIMETYPE] == "undefined") {
var ok = window.confirm(MSG1 + "\n" + MSG2);
if (ok) {
window.open("http://**************a.com.au/atschen.html");
window.close();
} else {
window.close();
}
} else if (navigator.mimeTypes[PLG_MIMETYPE].enabledPlugin == false) {
var MSG1 = "Java Plugin is disable.";
var MSG2 = "Enable to use Java Plugin.";
window.confirm(MSG1 + "\n" + MSG2);
window.close();
} else {
location.href = "http://***********************.com:51008/webapp/Wakeup******/wakeupFirst.jsp"
}
}
// -->
</SCRIPT>

<SCRIPT language="JavaScript">
<!--
function browserchk(){
chkplugin();
}
// -->
</SCRIPT>
</COMMENT>

</HEAD>

<BODY BGCOLOR=#ffffff TOPMARGIN=0 LEFTMARGIN=0>
<CENTER><IMG src="./homepage/index/welcome.gif" width="237" height="98" border="0"><BR>
</CENTER>
<SCRIPT language="VBScript">
<!--
chkplugin_VB()
-->
</SCRIPT>

<COMMENT>
<SCRIPT language="JavaScript">
<!--
browserchk();
// -->
</SCRIPT>
</COMMENT>

</BODY>

----------------------------------------------------------
I tried many scenarios but nothing is working... :(:(


Cheers
Sam

kingster

1:22 pm on Mar 3, 2011 (gmt 0)

10+ Year Member



Have you tried watching it through something like Fiddler for IE or TamperData plugin on FireFox?

Going through the code, I note that it is severely out of date - I doubt there's anyone out there still using Netscape Communicator/Navigator, or IE 4... But that being said, it's all browser side code as far as I can tell... There should be little to no difference in service times from Apache.

That being said though, IE with Fiddler or Firefox with TamperData can give you a very clear picture of what's taking a long time, and that's a good place to start.