Hi, not sure if this is the correct place but I have been stuck on an issue where my authentication hangs indefinitely without an explicit error when running my Django app on AWS. I feel like I am probably missing something obvious or I have made a simple mistake.
My application is in django 4.2.2, When running the implementation locally it works fine.
I have tried to strip back my authentication implementation to try discover what is wrong. I have also executed this via Django shell to validate where the error seems to be occurring.
I have managed to narrow down that the login hangs when sending a signal, this is from django.contrib.auth import login when the method executes user_logged_in.send(sender=user.__class__, request=request, user=user) where from django.contrib.auth.signals import user_logged_in.
I can confirm it indefinitely hangs when:
- trying to login via the site on the login page and admin login
- when creating a super user ( but the user gets created)
- when executing via the shell
My AWS set up tries to stay within free tier, so my application is deployed using ECS into the public subnet and traffic is routed via an application load balancer. I have no trouble reaching the site when it is running but it hangs when I successfully login (incorrect passwords will display a message). To try and avoid any network interference I have ssh'ed into the box and executed code line by line within the django shell.
Note: I have used django cookie cutter to build the application but stripped out all_auth as I hit a similar issue.