with this I would like to save the time when the first byte was received by 
httpd and later save it in request_rec->notes.

Note that a connection input filter will have the structure request_rec 
unitialized.



________________________________
From: alin vasile <alinachegal...@yahoo.com>
To: modules-dev@httpd.apache.org
Sent: Thu, April 15, 2010 5:42:26 PM
Subject: Input filters + apr_time_exp_lt/apr_time_now thread safety


Hi,

  I am using apache 2.2.14 with worker mpm.
 
  My module does the following:
    - my module config structure records two time values : 
config->time_request_in and config->time_request_in_end; they are allocated in 
child_init:
          config->time_request_in = apr_pcalloc(pool, sizeof (apr_time_exp_t));

   - in an Connection input filter I record the time_request_in as follows:
               ap_register_input_filter(my_filter_name, in_filter_start,NULL, 
AP_FTYPE_CONNECTION + 2  );
               ...
               apr_time_exp_lt(config->time_request_in, apr_time_now());

   - in an post_read_request handler I record the time_request_in_end:
                apr_time_exp_lt(config->time_request_in_end, apr_time_now());

  - i format these values and store in the request_rec->notes;
  - in the log phase I record them in a file

   At a very high load (450 req/s) I have some entries that have 
time_request_in_end greater than time_request_in. This is not normal and cannot 
be reproduced at lower loads (50 req/s).

   Did anyone encountered this issue? Maybe I am doing something wrong?

Your help is appreciated.

Thanks,
Alin


      

Reply via email to