502 Bad Gateway when trying to login as a user

Hi, I am trying to configure keycloak using saml to have a SSO for https://credentials-test.hedup.com/
It works if I click on the saml login but if I enter my user credentials I get 502 Bad Gateway.

Some more info is provided in the screenshot, sorry if it is a bit messy but as a new user I can only add one screenshot.
I am wondering if I have configured it wrongly to get an invalid xml file which I have to enter in the app I am trying to connect. I have created admin and user roles plus given my user access to both. I am completely new to keycloak and have spent a lot of time trying to connect as a user so any advice would be amazing. I hope I have provided enough information and please let me know if I am missing something. Thanks!

I made some updates which can be seen here:

https://stackoverflow.com/questions/64447028/502-bad-gateway-when-trying-to-login-as-a-user-on-keycloak

any progress about this problem. I have enabled remember-me and login with remember-me checkbox selected. It has successfully logged in and worked normally. but when i close browser and open again it returns 502 from keycloak auth url, although it is supposed to relogin and sustain session.

If you are running an nginx reverse proxy / ingress controller you might want to look at setting proxy-buffer-size: 128k

helm-charts/charts/keycloak at master · codecentric/helm-charts · GitHub

thank you. we are on it. but i have realized it has not cause any problem in my other laptop and my colleague’s laptop in a different network. It seems it throws 502 to some devices.