Maven deploy 504 behind nginx


I’m running Nexus Repository Manager version: OSS 3.16.2-01 behind a nginx reverse proxy.

I followed the recommendations in

to configure nginx site.

I’m deploying maven artefacts via Jenkins and maven deploy goal to maven hosted snapshot repository on nexus and most of the time it works - but sporadically I’m getting a 504 gateway timeout.

In the nexus log I’m observing the following log entries

2019-12-11 17:50:00,010+0100 INFO [quartz-3-thread-20] *SYSTEM - Task ‘Storage facet cleanup’ [] state change WAITING$
2019-12-11 17:50:00,015+0100 INFO [quartz-3-thread-20] *SYSTEM - Task ‘Storage facet cleanup’ [] state change RUNNING$

The exact message on maven-side is:

Could not transfer metadata XYZ/SNAPSHOT/maven-metadata.xml from/to XYZ (https://XYZ/repository/maven-snapshots): Failed to transfer file: https://XYZ/repository/maven-snapshots/XYZ/1.3-SNAPSHOT/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Gateway Time-out.

The nginx log says:

2019/12/11 17:53:14 [error] 4053#4053: *17327 upstream timed out (110: Connection timed out) while reading response header from upstream, client: XYZ, server: XYZ, request: “GET /repository/maven-snapshots/XYZ-SNAPSHOT/maven-metadata.xml HTTP/1.1”, upstream: “http://XYZ/SNAPSHOT/maven-metadata.xml”, host: “XYZ

Do you have any hint how I can find out what the root cause of this issue is? Do you know of a similar problem or can i activate a specific logger to find out more details?

Thanks in advance,

All the best