Wednesday, September 2, 2009

Connection time and response time

I've split Execution time into Connection time and Response time.

From now all, when viewing cron jobs' logs, you will see these two values.

For example, here's part of my logs for URL http://www.setcronjob.com/

Last execution time : Wed, 02 Sep 2009 11:45:08 UTC
Connection time : 0.0144
Response time : 0.000835
Output:

HTTP/1.1 200 OK
Date: Wed, 02 Sep 2009 11:45:08 GMT
Server: Apache
X-Powered-By: PHP/5.1.6
Content-Length: 6195
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Language: en

.........

At SetCronJob, the max connection time is 3 seconds, and max response time is 2 seconds.

4 comments:

  1. Cron Jobs are often used to perform long and heavy tasks so that they do not affect visitors/users experience on the site.
    3 seconds might be waaay too short for these tasks.

    For those of you scripting with php, there's a wonderful function that saves us all:

    ignore_user_abortv(true)

    "Sets wether a client disconnect should abort script execution".

    ReplyDelete
  2. Hi Francesco,

    Thank you for the function :)
    Here's the document for who interested in
    http://us2.php.net/manual/en/function.ignore-user-abort.php

    I'll have a post about this :)

    ReplyDelete
  3. Ops... without the ending "v":

    ignore_user_abort(true);

    :)

    ReplyDelete
  4. Yes, I see, but I dunno how to edit your comment :D

    ReplyDelete