# Maven deploy 504 behind nginx

**URL:** <https://community.sonatype.com/t/maven-deploy-504-behind-nginx/3137>\
**Category:** Sonatype Nexus Repository\
**Created:** [December 12, 2019, 9:48am UTC](https://community.sonatype.com/t/maven-deploy-504-behind-nginx/3137 "2019-12-12T09:48:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kdobsta](https://avatars.discourse-cdn.com/v4/letter/k/8491ac/32.png) [@Kdobsta](https://community.sonatype.com/u/Kdobsta)\
**Post date:** [December 12, 2019, 9:48am UTC](https://community.sonatype.com/t/maven-deploy-504-behind-nginx/3137/1 "2019-12-12T09:48:38Z")

</div>

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](https://help.sonatype.com/display/NXRM3/Run+Behind+a+Reverse+Proxy?_ga=2.45812903.2043704320.1576083921-524216300.1576083921)

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
