Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket REST API 504 gateway timeout while editing a file which is larger then 6MB

Danel Senior
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2025

 

I am currently experiencing an issue where using the REST API to edit a file of approximately 6–7 MB results in a gateway timeout error. Given the file size, this seems unexpected. Could you please advise on whether there is a known solution or workaround for this issue?

 

 

Error I get:org.springframework.web.client.HttpServerErrorException$GatewayTimeout: 504 Gateway Time-out: "<html><EOL><EOL><head><title>504 Gateway Time-out</title></head><EOL><EOL><body><EOL><EOL><center><h1>504 Gateway Time-out</h1></center><EOL><EOL><hr><center>NSX LB</center><EOL><EOL></body><EOL><EOL></html><EOL><EOL>"

 

 

Api I am calling calling:

PUT

/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path}

1 answer

1 accepted

2 votes
Answer accepted
Jim Knepley - ReleaseTEAM
Atlassian Partner
March 18, 2025 edited

Hi @Danel Senior, welcome to the community.

Are there any other systems between you and your bitbucket server, such as a reverse proxy that's doing the TLS work? I wonder if the timeout is a symptom and if the proxy is masking the actual problem.

There are a surprising number of adjustable timeout values in bitbucket.properties. If we can identify from the logs which timeout is being triggered, you can adjust the timeout value and it might solve your symptoms. About how long does the API call run before returning that 504?

If it's around 2 minutes, it might be this one:

 

Process execution

Controls timeouts for external processes, such as git.

Default value Description
process.timeout.execution
120

Configures a hard upper limit on how long the command is allowed to run even if it is producing output.

This value is in seconds. Using 0, or a negative value, disables the timeout completely.

process.timeout.idle
60

The idle timeout configures how long the command is allowed to run without producing any output.

This value is in seconds. Using 0, or a negative value, disables the timeout completely.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events