Out of resouce message

I am getting the following error message:

Resource Limit Is Reached
The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.

The page displays a list of street addresses.  If you hit the + button, you can walk up the street.  This only happens on my machine in IE after you have gone up about 30 blocks, but others are having the same problem after only 10 blocks.  It doesn't happen in FireFox (my default browser).  

When you hit the plus button, it goes to another page, adds to the address # and reloads the same page with new data.  Am I forgetting to close something?
breeze351Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Please post a link to the URL that demonstrates the problem, thanks.
0
breeze351Author Commented:
This is going to be tough to duplicate.  I've only had it happen to me once.  The client says that it happens every time when he clicks the "address +" button more than 9 times.

But here is the info.

URL: http://lansco.langsystems.net/
Login: breeze
Password: 351clv

Click "Walk By Map"
Street #: 50
Street Name: mad
(50 Madison Avenue)

Keep clicking "Address +".  It will walk you up Madison Avenue.  

I know there are some problems with some of the displays, but that has to do with the data.  The client sends out people to look at the block and they are supposed to report what stores are there and how much of the block they occupy.

I've attached the code for this.
Walk-Map-Display.php
0
RobOwner (Aidellio)Commented:
The error is returned from Walk-Map-Plus.php (and Walk-Map-Minus.php) before the redirection even takes place to Walk-Map-Display.php

What's in those files?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Julian HansenCommented:
It is possible this could be a hosting issue as well.

You don't mention a 508 error but it has the symptoms of one and is worth checking out.

This article might shed some light - although it centers around WP the principles remain the same

http://www.geteverything.org/resource-limit-is-reached-issue-in-wordpress-how-to-fix-it/
0
breeze351Author Commented:
I contacted the host and was told:

"If you have a low traffic website but are constantly at 20 entry processes, it means something is wrong with your scripts and they are hanging around longer than they should."

That leads to the following question.  Does this mean I have some scripts without "exit()" as the last line in the script?
0
Ray PaseurCommented:
Scripts that do not logically loop or wait should not need a separate exit or die() statement.  That is typically only used to interrupt processing.
0
breeze351Author Commented:
That's what I thought.  I'm not doing any looping or waiting in any of the scripts on this site.
The logic behind this is:

1. Keyin an address - Walk_By_Map.php
2. Display all the stores on the block where the address was found (or closest).  - Walk_Map_Display.php
3. When the user clicks the "address +", execute Walk_Map_Plus.php. This finds the next northern block and executes Walk_Map_Display.php.

Like I said previously, this is the only place it happens.  What else could be the problem?

Thanks
0
RobOwner (Aidellio)Commented:
Were not going to know until you can tell us what's in the Walk_Map_Plus file as that's where the issue is
0
breeze351Author Commented:
0
RobOwner (Aidellio)Commented:
Ok in Walk-By-Map-Inc.php, I have to rule out the following so bear with me:

- Move the <?php to the top of the page
- mysql_close($mysql); should be mysql_close($conn);
- move mysql_close($conn) to above the output of the header
- remove exit;

Note: you are using the mysql extension which is now obsolete. You should move to mysqli or PDO
0
breeze351Author Commented:
I will do as instructed, however a couple of comments/questions:

From what I understand the mysql_close is redunant since the connection get's closed when the script completes.  And I did see the close with the wrong resource last night.

The exit I added just for the hell of it to try.

I'll let you know tomorrow.

Thanks
0
breeze351Author Commented:
I've taken the code from "Walk_By_Map_Inc.php" and put it into "Walk_Map_Plus.php".  This gets rid of any problems with the inclusion.  I'm still getting the error.  This leads me to believe that the problem is in "Walk_By_Display.php".  What does it actually mean when Hosting24 says that "something is wrong with your scripts and they are hanging around longer than they should."?

Attached is the new version of "Walk_Map_Plus.php"

Thanks
Glenn
Walk-Map-Plus.php
0
RobOwner (Aidellio)Commented:
I disagree.  When it fails for me it doesn't get as far as sending the header to redirect Walk_By_Display.php

See my dev tools monitoring in the screenshot below.  You'll see that when it fails it doesn't redirect

Capture.JPG
Another thing to try is setup your Walk_Map_Display.php to include either Walk_Map_Plus.php or Walk_Map_Minus.php or nothing depending on a variable you pass it.
0
RobOwner (Aidellio)Commented:
You could try this and hopefully you get the error and you'll know what line failed

<?php
$counter=1;
echo "get here: ".$counter++."<br/>";
include 'Session_Start.php';
echo "get here: ".$counter++."<br/>";
include 'Check_Login.php';
echo "get here: ".$counter++."<br/>";
include 'db_connect_inc.php';
echo "get here: ".$counter++."<br/>";

// ****************************************************
// * Get data from original page,                     *
// ****************************************************

$strt = substr($_SESSION['Data'],0,9);
echo "get here: ".$counter++."<br/>";
$work = $strt."%";
echo "get here: ".$counter++."<br/>";
$address = $_SESSION['Address'];
echo "get here: ".$counter++."<br/>";

// ****************************************************
// * Incerment North                                  *
// ****************************************************

$north = $_SESSION['North_North_Button'];
echo "get here: ".$counter++."<br/>";
$south = $_SESSION['North_South_Button'];
echo "get here: ".$counter++."<br/>";
$east = $_SESSION['North_East_Button'];
echo "get here: ".$counter++."<br/>";
$west = $_SESSION['North_West_Button'];
echo "get here: ".$counter++."<br/>";


// ****************************************************
// * Select New Address                               *
// ****************************************************

$SqlString1 = "SELECT * FROM mapfile WHERE 
			`NOR` = \"$north\"
			AND 
			`SOU` = \"$south\"
			AND 
			`EAS` = \"$east\"
			AND 
			`WES` = \"$west\"";
echo "get here: ".$counter++."<br/>";
			
$mapfile = mysql_query($SqlString1,$conn);
echo "get here: ".$counter++."<br/>";
$ROW = Mysql_fetch_assoc($mapfile, MYSQL_BOTH);
echo "get here: ".$counter++."<br/>";
$_SESSION['Data'] = $ROW['SEQ'].$ROW['STOREKEY'];;
echo "get here: ".$counter++."<br/>";
$_SESSION['Address'] = $ROW['BNMB'];
echo "get here: ".$counter++."<br/>";
mysql_close($conn);
echo "get here: ".$counter++."<br/>";
//Header("Location: Walk_Map_Display.php");
echo "<a href=\"Walk_By_Map.php\">Continue</a>";
?>

Open in new window

0
breeze351Author Commented:
Rob:
No joy.  I started at 100 Madison Ave (between 29th and 30th).  The first time it got up to between 67th and 68th before it blew up.  I did it again starting at 100 Mad and made it all the way to the end of Madison Ave (somewhere in the upper 90's) with out blowing up!!!!!  The third time it blew up in the 40's.

I'm not sure what you meant by this comment:
"Another thing to try is setup your Walk_Map_Display.php to include either Walk_Map_Plus.php or Walk_Map_Minus.php or nothing depending on a variable you pass it. "

I don't know if it's plus or minus until you click the button so there is nothing to pass.
0
breeze351Author Commented:
Rob:
I modified the code to display the counter.  Forgot that in the last message.
0
RobOwner (Aidellio)Commented:
Yes i got it to crash as well but at least we've identified that it is Walk_Map_Plus

Capture.JPG
0
RobOwner (Aidellio)Commented:
i think you'll find this could be unrelated to your code as is a memory limit imposed by your web host.  Have you contacted them about the issue?
0
breeze351Author Commented:
I contacted "Hosting24".  Would this work?
CPU Speed: 2000 Mhz
Memory: 2048 MB
Disk Space: 20000 MB
Bandwidth: 2000 GB
Connection: 40 Mb/s
Dedicated IPs 2 IPs
0
RobOwner (Aidellio)Commented:
I wouldn't think this is solely hardware. More a configuration issue in apache or whatever web server they're running
0
RobOwner (Aidellio)Commented:
If it's running on anything less then yes that would be min specs required
0
RobOwner (Aidellio)Commented:
What's the webserver configuration ?  Is it running IIS or Apache or something else?  What's the memory limits allowed?

What does phpinfo show?  Can you post it here?  If you're not familiar with that just create a simple php page with nothing but <?php phpinfo(); ?> and post the details here.  Please review before you do to remove any sensitive info.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
breeze351Author Commented:
Upgraded to a VPS and problem went away
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.