JackH
Still seeing slow deploys EU West region
Just an FYI I'm still seeing very slow deploys in the EU. https://status.railway.app/ says it was fixed yesterday. Below is a project ID with my latest deploy taking over 40 minutes and still building: fd47fa02-a69d-4c30-b48d-10ea2eed7e03
6 replies
Data Fetching Issue: Outdated Content from External TXT file Despite Cache Control Measures
[Project ID: 9628a8da-e395-4f61-9904-4850be48eac0]
TL;DR
I'm trying to find out why my Railway-hosted application is not fetching the latest data from my external TXT file despite successful fetches in other environments and having implemented standard cache control measures. Any insights into Railway-specific configurations, caching, or network behaviours that might be affecting outbound HTTP requests would be helpful.
Detail:
I have an application hosted on Railway which is not fetching the latest data from an external TXT file. When the same request is made from local development, Postman, or via a browser, it retrieves the latest data. Railway continues to receive an older version of the data.
It's a really simple request:
app.get('/downloadproductfeed', async (req, res) => {
try {
const response = await fetch('https://www.example.com/feed.txt', {
headers: {
'Content-Type': 'text/plain',
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': '0'
}
});
if (!response.ok) {
throw new Error(
Error fetching data: ${response.statusText});
}
const data = await response.text();
console.log(data);
res.send(data);
} catch (error) {
console.error('Error:', error);
res.status(500).send('An error occurred while fetching the product feed.');
}
});
Steps Taken to Resolve:
- Implemented Cache Control Headers
- Redeployed Application on Railway to ensure that the latest code is running.
- Confirmed that the external TXT file is updated and contains the latest data.
- Checked with Different Clients: Made requests to the same endpoint using various clients (like Postman and browsers), which successfully fetched the latest data, indicating the problem is specific to the Railway environment.
Any pointers would be hugely appreciated.14 replies