nginx / nginx/nginx

nginx logs missing time

Open
#1,340 3 comments 0 reactions 1 assignee View on GitHub

@anuj1520 is already working on this.

Since Aug 20, 2026.

bug
Dominant language
C
Stars
31.7k
Forks
8.3k
Avg merge
1d 12h
Merged PRs (30d)
13

Description

Bug Overview

I have nginx running a complex config for a website. It usually works and logs perfectly. I go through the logs each day. Like usual, I opened access.log, this time I noticed a huge gap between 11am the 10th of May and right now (11am on 11th May). Usually when I encounter missing logs I restart the nginx process and the logs return (this has happened before). This time, no logs were returned. The only effect was that after restarting, future requests were logged like normal. After reading the kernel log, I confirmed that hundreds to thousands of requests were received in that time but not logged. The website was functioning normally throughout this period. The error log was still outputting during this time.

Expected Behavior

I expect logs to be consistent with no time gaps.

Steps to Reproduce the Bug

Run an nginx process with many servers for a few weeks. You may start to notice times where nginx stops logging at seemingly random points, and that restarting the process tends to fix it.

NGINX Configuration

Logging Settings

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

NGINX version and build configuration options

nginx version: nginx/1.26.3+deb13u2

Environment where NGINX is being built and/or deployed
  • Target deployment platform: VPS
  • Target OS: headless Debian 13
Architecture where NGINX is being built and/or deployed

AMD64

NGINX Debug Log

Nothing relevant so far. Will enable and watch over next few days.

Edit: it happened again, access log stopped for about 6 hours and didn't start again until I restarted it. I checked the error log and there's no gap, so it only effects the access log. But there's no sign of any errors related to logging.

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.