Welcome! Log In Create A New Profile

Advanced

$request_time variable = 0 for small files.

Clima Gabriel
March 07, 2024 01:18AM
Greetings,
I'm investigating a bug, super easy to reproduce.
Thought you might be curious.

Minimal Nginx config. Create two files. 100M and 1M:
dd if=/dev/zero of=/var/www/file100M bs=100M count=1
dd if=/dev/zero of=/var/www/file1M bs=1M count=1

Get them files:
curl --limit-rate 10M -o /dev/null 127.0.0.42:80/file100M
curl --limit-rate 100k -o /dev/null 127.0.0.42:80/file1M

Both transfers take ~10s, but Nginx logs 0s request_time for the small file.

master_process off;
daemon off;
error_log /dev/stderr;
events {}
http
{
log_format req_time "$request_time";
server
{
server_name 127.0.0.42;
listen 127.0.0.42:80;
root /var/www/;
index index.html;
location /
{
access_log /dev/stderr req_time;
error_log /dev/stderr;
}
}
}
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

$request_time variable = 0 for small files.

Clima Gabriel March 07, 2024 01:18AM

Re: $request_time variable = 0 for small files.

J Carter March 07, 2024 04:46AM

Re: $request_time variable = 0 for small files.

Clima Gabriel March 07, 2024 05:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready