Question

524 timeout, from nodejs application

Hi, I have a nodejs application running on digital ocean where users are uploading files to an external site.

Lately these files are getting 524 timeout errors more frequently than not - and i cant see any reason why. If I am running the application locally on my machine this issue does not happen. It does not appear to matter if the file size is large or small.

Apologies if this is not enough context.

Here are the headers:

Request URL: https://projectmgr.live/syncsketch-upload/2257272/?noConvertFlag=0
Request Method: POST
Status Code: 524 
Remote Address: 104.16.244.78:443
Referrer Policy: strict-origin-when-cross-origin
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 76b76e063d19e9b7-BNE
content-type: text/html; charset=UTF-8
date: Thu, 17 Nov 2022 09:31:33 GMT
expires: Thu, 01 Jan 1970 00:00:01 GMT
referrer-policy: same-origin
server: cloudflare
set-cookie: cf_use_ob=0; path=/; expires=Thu, 17-Nov-22 09:32:03 GMT
x-frame-options: SAMEORIGIN
:authority: projectmgr.live
:method: POST
:path: /syncsketch-upload/2257272/?noConvertFlag=0
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8
access-control-allow-origin: *
authorization: apikey ***omitted***
content-length: 38807628
content-type: multipart/form-data; boundary=----WebKitFormBoundaryCnT3RL4XibQxBZoZ
cookie: AWSALBTG=5IHXnRjofCN86cW2uuxosAnWXlqSuVa0z7S45FKVwCmvgQdwyT0KHvPAutEH9A/pSbHZzOduB5e72hdL2iKuhjqAt8+epcyXodYQi1sbV6vtgggUdk5ZLODVdlTZMQ+gFIBfqF3i7MeLf6pEir2KsWq2nv+GUv/5VFREaaEhiw8o; AWSALBTGCORS=5IHXnRjofCN86cW2uuxosAnWXlqSuVa0z7S45FKVwCmvgQdwyT0KHvPAutEH9A/pSbHZzOduB5e72hdL2iKuhjqAt8+epcyXodYQi1sbV6vtgggUdk5ZLODVdlTZMQ+gFIBfqF3i7MeLf6pEir2KsWq2nv+GUv/5VFREaaEhiw8o
origin: https://projectmgr.live
referer: https://projectmgr.live/Projects?ProjectId=LADUS0029_Zootopia&BoardId=3406333260&GroupId=topics
sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Here is an example error response:

<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="robots" content="noindex">
		<style>body,html{height:100%;margin:0}body{display:flex;align-items:center;justify-content:center;flex-direction:column;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}p{text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;color:#000;font-size:14px;margin-top:-50px}p.code{font-size:24px;font-weight:500;border-bottom:1px solid #e0e1e2;padding:0 20px 15px}p.text{margin:0}a,a:visited{color:#aaa}</style>
	

</head>

	<body>
		<p class="code">
			Error
		</p>
		<p class="text">
			We encountered an error when trying to load your application and your page could not be served. Check the logs for your application in the App Platform dashboard.
		</p>
		<div style="display:none;"><div class="cf-error-details cf-error-524">
  <h1>A timeout occurred</h1>
  <p>The origin web server timed out responding to this request.</p>
  <ul>
    <li>Ray ID: 76b76e063d19e9b7</li>
    <li>Your IP address: 123.211.4.142</li>
    <li>Error reference number: 524</li>
    <li>Cloudflare Location: Brisbane</li>
  </ul>
</div>
</div>
	</body>
</html>


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
November 21, 2022

Hi there,

It seems like this response is coming from Cloudflare. Have you tried temporarily disabling Cloudflare and see if this problem occurs?

How long does it usually take to complete the upload request?

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up