At 500-1000 amount of online the page dies having at least one ssr request, locally everything works
Hi everyone, I am new to Nuxt, please help me to understand. The problem is very slow Nuxt application, as soon as I make at least one request on the server side when reloading the page it is no longer played but endlessly loads.
In the server logs there is a description of the 502 error and below the code how I send the request.
Locally it works fast and on the dev too, but only if zadeploit on production where the online more than 1000 people, there are slips.
While the server is not loaded even at 50% neither on memory, nor on CPU, nor on disk.
For some reason in GET request also content-type : undefined I tried to specify explicitly but it did not help.
getServerM (endpoint, params = {}) {
const self = this
return new Promise(function (resolve, reject) {
useFetch(
${self.basePath}${endpoint}
, {
method: 'GET',
params: {
...params
}
}).then(function (resp) {
resolve(resp.data)
}).catch(function (err) {
reject(err.response)
})
})
}1 Reply
@Rtyx I'm not sure you use useFetch the right way there 🤔