Opened 12 years ago

Closed 12 years ago

#339 closed enhancement (invalid)

Time zone lookup needs to be cached

Reported by: Michael Thomson Owned by:
Priority: major Milestone: 1.5
Component: nginx-core Version: 1.3.x
Keywords: Cc:
uname -a: Darwin server-a 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
nginx -V: nginx version: nginx/1.3.15
built by clang 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --http-log-path=/var/log/nginx-access.log --conf-path=/etc/nginx/nginx.conf --add-module=../ModSecurity/nginx/modsecurity --add-module=../ngx_devel_kit --add-module=../array-var-nginx-module --add-module=../echo-nginx-module --add-module=../encrypted-session-nginx-module --add-module=../form-input-nginx-module --add-module=../headers-more-nginx-module --add-module=../iconv-nginx-module --add-module=../lua-nginx-module --add-module=../ngx_http_auth_request_module --add-module=../redis2-nginx-module --add-module=../set-misc-nginx-module --add-module=../srcache-nginx-module --add-module=../xss-nginx-module --add-module=../nginx-statsd --add-module=../ngx_http_auth_pam_module --with-http_gzip_static_module --with-http_ssl_module --with-http_stub_status_module --with-pcre=../pcre-8.31 --with-pcre-jit --with-http_addition_module --with-http_realip_module --with-http_gunzip_module --with-ipv6 --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module

Description

On OSX and maybe other platforms.

The time zone file i.e. /usr/share/zoneinfo/Australia/Sydney is constantly being read (as verified by fs_usage).

It should be cached to prevent unnecessary disk reads. See here for a possible example how:

https://github.com/opdenkamp/xbmc/commit/6801b9f23f5f1430d96ab8d60fd29ce9ca05e365

Change History (1)

comment:1 by is, 12 years ago

Resolution: invalid
Status: newclosed

nginx does not read the time zone file by itself. nginx calls libc localtime() function which in turn can read this file. There is no way to prevent libc to read it by nginx means. Please report this issue to Apple.

The example above is Windows-specific interface. Unfortunatly Unicies have no way to get current timezone and daylight state without localtime() functions.

Note: See TracTickets for help on using tickets.