how to fix the OSerror[Errno 5] input/output error when deploy django project with uwsgi and nginx?

1,550 views
Skip to first unread message

jie.l...@gmail.com

unread,
Mar 20, 2014, 9:19:37 PM3/20/14
to django...@googlegroups.com

My enviorent is : UBUNTU 12.04, django 1.6.1 python 3.3.4 nginx 1.4.7 and uwsgi 2.0.2 The problem came when I registered a new user,Exception location is where the code is "if form.is_valid()".

Exception value:[Errno 5] Input/output error

I just test it with the django's development server, NO ERROR!

SO I think the problem lies somewhere with uwsgi or Nginx?

my code dealing with the registration is :

def register(request):
    form = UserCreationForm()
    action = "注册"
    template_name='accounts/auth_form.html' if request.is_ajax() else 'accounts/auth.html'
    if request.method == "POST":        
        form = UserCreationForm(data=request.POST)
         ***if form.is_valid():#Exception here***
            form.save(request=request)
            username=request.POST.get('username')
            email_domain=request.POST.get('email').split('@')[1]
            if request.is_ajax():
                return TemplateResponse(request,"accounts/register_feedback.html",locals())  
            else:
                return TemplateResponse(request,"accounts/register_feedback.html",locals())
    return TemplateResponse(request,template_name,locals())   

Then my uwsgi configuration is just like what the django document provides:

[uwsgi]
socket = 127.0.0.1:3031
chdir = /home/fox/KuaiPan/fox/
pythonpath = ..
env = DJANGO_SETTINGS_MODULE=myauth.settings
module = django.core.handlers.wsgi:WSGIHandler()
processes = 4
threads = 2
stats = 127.0.0.1:9191

This problelm is really annoying,how to fix it? THX in advance!

Reply all
Reply to author
Forward
Message has been deleted
0 new messages