Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6105503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:58:46+00:00 2026-05-23T13:58:46+00:00

i really didnt know how to word the title so i did the best

  • 0

i really didnt know how to word the title so i did the best i could.

we have an issue where we calculate final script (web based) execution time.

we do a simple

if(time()-$_SERVER['REQUEST_TIME']>X){
    logMe();
}

we find that sometimes the script is shown to take longer then X seconds to execute.

we are 100% sure this is not an issue with mysql, memcached, sphinx or any of the other usual culprits. please… just assume that its not ‘something on our end’ holding it up.

we even added this simple exec time check way way up in the script, before any heavy processing is done and there are still some hits. mainly far far away overseas clients.

so i am thinking this must be related to the output buffer somehow.

so the question is as follows:

in php + apache, how does the output buffer work? lets say you have the following:

[ 10KB HTML Body Head ]

[ Mysql query #1 ]

[ 50KB HTML Body ]

[ Mysql query #2 ]

[ 20KB HTML Body Footer ]

in this example, imagine you have a client connection that maxes out at 2KB/s.

so in the most ideal situation, it would take him 5 seconds to recieve the “HTML Body Head”.

does that mean it will take 5 seconds before “Mysql query #1” is executed?

i think you get the idea. does a slow client connection affect how long it takes for a script to be processed.

further more: do any php.ini settings affect this, and does flush()/ob_flush()?

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:58:46+00:00Added an answer on May 23, 2026 at 1:58 pm

    PHP will execute at maximum possible speed, and if output has to be buffered, the script will NOT pause until the buffer empties. It’ll just keep filling up the buffer until the script ends.

    How big is your ‘X’ value? $_SERVER[‘REQUEST_TIME’] comes from Apache itself, and is when the hit came in. There may be a pause in Apache to wait for a child process to become available to service the request. There can be pauses in PHP while waiting for a resource to open up (e.g. no more free database handles, so wait for one to free up). Then there can be delays for the database itself to execute and retrieve data off disk, etc…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really didnt know what to put to the title so sorry about that.
I didnt know how to word the question, so sorry if it doesnt really
Didn't know how to word the title sorry. Basically I have a comments system,
i didn't really know how to title this question, but here's a thing that
Sorry for the vague title but I really didn't know what title to give
Sorry if this is a dupe, couldn't find it but didnt really know what
Ok, I didn't really know how to even phrase the question, but let me
I really didn't want to have to waste people's time and ask this, but
Well this is a really weird issue, I really didn't find anything on this
I have googled this a little and didn't really find the answer I needed.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.