#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2004
    Location
    Boston, MA USA
    Posts
    573
    Rep Power
    51

    CloudFlare Time-out


    I have a management system which is built using PHP/MySQL.

    Some of the Scripts and database calls are fairly extensive and take longer than 100 seconds. The site is currently monitored by CloudFlare which has a rigid timeout after 100 seconds. If Cloudflare does not receive data from the server after 100 seconds it returns an ugly timeout page.

    Is there a way to send some "in-progress" data to the browser while a PHP/MySQL script is running so that Cloudflare won't time-out?

    Thanks
  2. #2
  3. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,896
    Rep Power
    9646
    Not that I would recommend doing.

    100 seconds is a really long time. Have you checked whether the database queries can be optimized? Can the script work be broken down into smaller portions to be executed in series? Anything that can be done in the background?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2004
    Location
    Boston, MA USA
    Posts
    573
    Rep Power
    51
    Originally Posted by requinix
    Not that I would recommend doing.

    100 seconds is a really long time. Have you checked whether the database queries can be optimized? Can the script work be broken down into smaller portions to be executed in series? Anything that can be done in the background?
    Sorry not to have responded earlier... you're very good at responding to posts...

    Yes, MySQL optimization is one of those things I need to learn more about. My application has been growing like crazy and I need to step back and focus on core methodology.

    Thanks again
  6. #4
  7. Lord of the Dance
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Oct 2003
    Posts
    4,182
    Rep Power
    2011
    If you don't already know about the EXPLAIN statement, I will suggest you have a look at it. This will especially be good for optimizing indexes on your tables.

IMN logo majestic logo threadwatch logo seochat tools logo