djangodjango-viewswsgidjango-wsgi

Development wsgi server is getting stuck while returning a HttpResponse() in Django (debug=True)


I am sending username from the frontend using an ajax call to backends login() (in view.py) in django . where first I am verifing and then setting the session variables for the same. After this, I am returning a message whether login is successful or not using:

def login(request):

     user = request.POST.get('user')
     msg = verify_user_credentials(user)
     if msg == True:
         reuest.session['user'] = user
     return HttpResponse(msg)

But while returning it is getting stuck and holding a terminal. So, the whole tool is getting hung.

login() successfully checking the credentials and adding them up in session successfully each and every time but don't know why it is getting stuck while returning the HttpResponse(msg) in some cases.

Additional Information:


Solution

  • After using Nginx with the passenger as a server for the application issue resolved.