Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > PHP Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-02-2009, 01:34 PM
  #1
cmetz1977
Myrmidon (Level 12)
 
cmetz1977's Avatar
 
Join Date: May 2008
Location: Lakeland, FL
Posts: 193
iTrader: (0)
cmetz1977 will become famous soon enough
Preventing Time Outs

I have a client whose browser times out when loading a page that takes a while (20 minutes?) to generate. I could not file a response header that identifies this issue, can anyone help me with this?

I am using PHP if that is a factor...
__________________
Never accept Kool-aid from someone who won't drink from the same punch bowl.
cmetz1977 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-03-2009, 01:52 AM
  #2
rmathus
Novice (Level 1)
 
Join Date: Nov 2009
Posts: 8
iTrader: (0)
rmathus is an unknown quantity at this point
The page itself could be timing out for a number of reasons. Since you mentioned you're using PHP are you also using MySQL? I would assume so based on the amount of time it took for the page to load and you may want to consider optimizing the MySQL query and/or database if that's the case.

If you are indeed using MySQL, you can change the timeout settings following this reference. Otherwise, you might want to check that PHP is OK by creating a simple test page that echos a word out to the browser (or even a phpinfo() page).

-Ryan M.

Last edited by Pegasus : 11-03-2009 at 02:53 AM. Reason: sig removed - you can have one after 30 days membership and 30 posts
rmathus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-03-2009, 08:22 AM
  #3
cmetz1977
Myrmidon (Level 12)
 
cmetz1977's Avatar
 
Join Date: May 2008
Location: Lakeland, FL
Posts: 193
iTrader: (0)
cmetz1977 will become famous soon enough
Ryan,

Thank you for your response.

I have since learned that this may be a firewall issue on their end. The reason I considered sending headers was that this was only a problem for this particular client. I was hoping to manipulate their browser to not get bored and time out, to expect a long wait. This script works fine everywhere else, so it seemed to be an isolated incident.

Since the firewall theory holds water, our troubleshooting has gone in that direction. Thank you again, and Godspeed!
__________________
Never accept Kool-aid from someone who won't drink from the same punch bowl.
cmetz1977 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-03-2009, 05:19 PM
  #4
Horus_Kol
Mod of the Underlay
 
Horus_Kol's Avatar
 
Join Date: Jun 2002
Location: At a desk, hooked up and ready to rock
Posts: 17,242
iTrader: (0)
Horus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of light
20 minutes to generate a page?!

you might want to think about chunking that up a bit - if it all has to be on one page (like a report or something), you could build it up in Ajax requests or something...
__________________
Personal Blog (and photos): HorusKol
Articles on Programming and Development (PHP/HTML/CSS, C/C++, more): RandomTweak

The great secret that no SEO agent wants you to hear: if you build your website using w3c accessibility guidelines and your content is written for people, you will do better for longer in search engines than any other method...
Horus_Kol is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-03-2009, 06:00 PM
  #5
cmetz1977
Myrmidon (Level 12)
 
cmetz1977's Avatar
 
Join Date: May 2008
Location: Lakeland, FL
Posts: 193
iTrader: (0)
cmetz1977 will become famous soon enough
It's actually generating a file with about 20,000 records then transferring it to an FTP server. Although the records are coming from several different tables, they all need to be in the same file, and the client wants it all in one process.

When what we assume is the firewall, terminates the connection after so long all the processing on the server ceases as well. This leaves a fragment of the finished file on the server and it never gets sent to the FTP server.
__________________
Never accept Kool-aid from someone who won't drink from the same punch bowl.
cmetz1977 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:02 AM
  #6
Horus_Kol
Mod of the Underlay
 
Horus_Kol's Avatar
 
Join Date: Jun 2002
Location: At a desk, hooked up and ready to rock
Posts: 17,242
iTrader: (0)
Horus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of lightHorus_Kol is a glorious beacon of light
hmm... the server should complete the script regardless of whether the connection timed out (HTTP is a stateless protocol).

I think you are hitting a timeout set in PHP or somewhere else on the server if your script is stopping...
__________________
Personal Blog (and photos): HorusKol
Articles on Programming and Development (PHP/HTML/CSS, C/C++, more): RandomTweak

The great secret that no SEO agent wants you to hear: if you build your website using w3c accessibility guidelines and your content is written for people, you will do better for longer in search engines than any other method...
Horus_Kol is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 03:45 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.