Reverse proxy - timeout

Sonatype Nexus RepositoryOSS 3.66.0-02
nginx-1.24.0/Apache-2.4.52
LDAP auth

From time to time we get ‘503 Timed-out error’ from Nginx.
The same with Apache2 - ‘The timeout specified has expired… AH01102: error reading status line from remote server 127.0.0.1:8080’

So, something wrong with Nexus , not the proxy in front of

In Nexus logs:

request.log

xxx - - [22/Apr/2024:14:07:13 +0300] "HEAD /repository/docker/v2/... HTTP/1.1" 401 - 0 2 "containerd/v1.6.12-k3s1" [qtp955075168-5580]
xxx - user [22/Apr/2024:14:07:14 +0300] "HEAD /repository/docker/v2/... HTTP/1.1" 200 - 0 527 "containerd/v1.6.12-k3s1" [qtp955075168-5620]
xxx - - [22/Apr/2024:14:07:14 +0300] "GET /repository/docker/v2/d... HTTP/1.1" 401 - 113 1 "containerd/v1.6.12-k3s1" [qtp955075168-5638]
xxx - user [22/Apr/2024:14:07:15 +0300] "GET /repository/docker/v2/... HTTP/1.1" 200 - 2831 277 "containerd/v1.6.12-k3s1" [qtp955075168-5591]
xxx - user [22/Apr/2024:14:07:15 +0300] "GET /repository/docker/v2/... HTTP/1.1" 200 - 3916 271 "containerd/v1.6.12-k3s1" [qtp955075168-5638]

nexus.log

2024-04-22 14:07:02,340+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'System - Repository Health Check: docker' [healthcheck] state change WAITING -> RUNNING
2024-04-22 14:07:02,689+0300 WARN  [quartz-10-thread-20]  *SYSTEM com.sonatype.insight.scan.client.ClientScanner - Could not locate client info descriptor
2024-04-22 14:07:04,637+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.scheduling.TaskSchedulerImpl - Task 'System - Repository Health Check: docker' [healthcheck] scheduled: hourly
2024-04-22 14:07:04,640+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'System - Repository Health Check: docker' [healthcheck] state change RUNNING -> WAITING (OK)
2024-04-22 14:07:14,636+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'System - Repository Health Check: docker' [healthcheck] state change WAITING -> RUNNING
2024-04-22 14:07:15,626+0300 INFO  [quartz-10-thread-20]  *SYSTEM com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask - Received health check report for repository docker
2024-04-22 14:07:15,633+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.scheduling.TaskSchedulerImpl - Task 'System - Repository Health Check: docker' [healthcheck] scheduled: hourly
2024-04-22 14:07:15,634+0300 INFO  [quartz-10-thread-20]  *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'System - Repository Health Check: docker' [healthcheck] state change RUNNING -> WAITING (OK)

On the client’s side:

Warning  Failed       4m7s                kubelet            Failed to pull image "...": rpc error: code = Unknown desc = failed to pull and unpack image "...":failed to copy: httpReadSeeker: failed open: unexpected status code ...: 504 Gateway Time-out
Normal   Pulled       118s                kubelet            Successfully pulled image "..." in 1m57.376363045s (1m57.376377176s including waiting)