Maven deploy 504 behind nginx

Hi,

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

I followed the recommendations in

https://help.sonatype.com/display/NXRM3/Run+Behind+a+Reverse+Proxy

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 org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task ‘Storage facet cleanup’ [repository.storage-facet-cleanup] state change WAITING$
2019-12-11 17:50:00,015+0100 INFO [quartz-3-thread-20] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task ‘Storage facet cleanup’ [repository.storage-facet-cleanup] state change RUNNING$
2

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

Klaus