Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Heisenbug - 502 Bad Gateway #181

Closed
deepakduggirala opened this issue Feb 29, 2024 · 0 comments · Fixed by #182
Closed

UI Heisenbug - 502 Bad Gateway #181

deepakduggirala opened this issue Feb 29, 2024 · 0 comments · Fixed by #182
Assignees

Comments

@deepakduggirala
Copy link
Contributor

deepakduggirala commented Feb 29, 2024

Observed in xenium

Error: Server Error 
Object { stack: "Bt@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:33:31354\nb0e@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:35:1052\nm@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:35:4262\n", message: "Request failed with status code 502", name: "AxiosError", code: "ERR_BAD_RESPONSE", config: {…}, request: XMLHttpRequest, response: {…} }

code: "ERR_BAD_RESPONSE"

config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }

message: "Request failed with status code 502"

name: "AxiosError"

request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }

response: Object { data: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.25.2</center>\r\n</body>\r\n</html>\r\n", status: 502, statusText: "", … }

stack: "Bt@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:33:31354\nb0e@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:35:1052\nm@https://xenium.sca.iu.edu/assets/index-c0ad7be5.js:35:4262\n"

<prototype>: Object { constructor: Bt(e, t, n, o, r), toJSON: toJSON(), stack: "", … }
index-c0ad7be5.js:37:22388

This error is an unintended side effect of API's pm2 file-watch feature (run inside API docker container). When workers upload a report html to the API server, it gets stored in one of the sub-directories under /api and this triggers the pm2 to auto-restart the api server. Nginx could not forward the requests from UI while the server restarts and these are reported as 502 - Bad Gateway. (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant