Link to home
Start Free TrialLog in
Avatar of anamikamamidi

asked on

Can we force from php page to free server memory?

Hi friends this is a tricky issue, I am not able to solve and seek some experts help in this regard. Please bear me for my long explanation.

My site name is AAA. And the publisher site name is BBB.
I created ad.php in the root of my website manually and put some html/javascript code which rotates 3 "400x50 " banners with some news items. I have this link ( to the publisher to display my ads in his website for some amount. The publisher is using iframes and displaying my page (ad.php) in that iframe. Then my ads display in his website and users click them and come to my website.

In nights my website is fast and in mornings due to the traffic it has become very slow and some times connection timed out.. Im suspecting some thing wrong iwth the javascript code im using for ad rotation, but same code is used from my friend in his website and is very good. But ofcourse a different webhost.

So, I am suspecting there might be too many instances problem or memory issue... so is there any way that i can release memory or free the variables im using in this below code to improve performance?

My website is a wordpress site. BUt the ad page i created manually from the root as ad.php. But the images which im using in that page are uploaded from wordpress admin in the media.  And using those path in the ad.php. plz see below code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<style type="text/css">
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
<script language="JavaScript"><!-- 
//store the quotations in arrays

images = new Array(2);

images[0] = "<a href = '' target='_blank'><img src='
content/uploads/2013/04/een300apr12.png' border='0' alt=''></a>";

images[1] = "<a href = '' target='_blank'><img src='' border='0' alt=''></a>";

ndex = Math.floor(Math.random() * images.length);
// --></script></head><body>
<script language="javascript">

Open in new window

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The performance problem is with the host.  I assume this is low-cost or free shared hosting. Host offering such sites grossly oversell servers to be able to make a profit, and the result is that there are period of very poor response time and a high incidence of downtime.  You get what you pay for.  It the site is a serious enterprise then you need to move to higher quality host, or upgrade to a plan where you will be on a less congested server.