I am getting 503 after exactly 30 sec while exporting all user data from react app.
export const get = (
url: string,
queryParams: Object = {},
extraHeaders: Object = {},
responseType: string = 'text',
callback?: number => void
): Promise<*> =>
superagent
.get(url)
.timeout({
response: 500000,
deadline: 600000
})
.use(noCache)
.set('Accept-Language', (i18n.language || 'en').split('_')[0])
.set(extraHeaders)
.responseType(responseType)
.query(queryParams)
.on('progress', e => {
if (callback) {
callback(e.percent)
}
})
Technology Stack used: Akka http (backend), react js (front end), Nginx (docker image). i have tried to access akka api directly with curl command request executed in 2.1min successfully data exported in .csv file.
Curl command : curl --request GET --header "Content-Type: text/csv(UTF-8)" "http://${HOST}/engine/export/details/31a0686a-21c6-4776-a380-99f61628b074?dataset=${DATASET_ID}" > export_data.csv
NOTE: on my local env. i am able to export all records from react UI in 2.5 min. but this issue is coming on TEST site. and test site is setup with docker env. images for this application.
Error At Browser Console:
GET http://{HOST}/engine/export/details/f4078a63-85bc-43ac-b9a9-c58f6c8193da?dataset=mexico 503 (Service Unavailable)
Uncaught (in promise) Error: Service Unavailable
at Request.<anonymous> (vendor.js:1)
at Request.Emitter.emit (vendor.js:1)
at XMLHttpRequest.t.onreadystatechange (vendor.js:1)
this is coming on PRODUCTION and TEST site. then only difference in local and test site is docker images.
Could you please help me for the same?
Thank you in advance.