Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Django Error: IOError: error waiting for wsgi.input data

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


david.mohl at hotmail

Dec 20, 2011, 6:13 AM

Post #1 of 6 (952 views)
Permalink
Django Error: IOError: error waiting for wsgi.input data

Hey !
First of all, i'm not quite sure if this is the right place for my problem.
Tho it's only cheorkee related.

For about 1 weeks i'm getting a django error when trying to access my page
via post. The page is embedded in facebooks app-canvas. Means facebook
posts some data every time someone accesses the page.

The problem occurs only in chrome as far as i can tell.
The handler itself is a simple uwsgi handler, using the following command:
"/usr/local/bin/uwsgi -s 127.0.0.1:58547 -x /var/www/apps/myapp/uwsgi.xml"

Stack Trace:
(...)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
line 210, in _get_post
self._load_post_and_files()

File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
line 289, in _load_post_and_files
self._post, self._files = QueryDict(self.raw_post_data,
encoding=self._encoding), MultiValueDict()

File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
line 249, in _get_raw_post_data
self._raw_post_data = self.read(content_length)

File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
line 301, in read
return self._stream.read(*args, **kwargs)

IOError: error waiting for wsgi.input data


UWSGI Output:
'uwsgi.node': 'prismriver',
'uwsgi.version': '0.9.9.2',
'wsgi.errors': <open file 'wsgi_input', mode 'w' at 0x271f9c0>,
'wsgi.file_wrapper': <built-in function uwsgi_sendfile>,
'wsgi.input': <uwsgi._Input object at 0x2213120>,

Tried to change some permission (because of the mode "w"), restarting the
server, messing around with uwsgi settings but didn't really help.

Am i the only one having this problem?
It's kind of critial because the application is not usable for chrome users
anymore.
The problem occured someday all of a sudden. I didn't change anything on
the server settings (as far as i can remember).

Any solutions on that?
Could the chrome 16 release last week be the problem?


Regards,
David


cherokee at thelazy

Dec 20, 2011, 6:44 AM

Post #2 of 6 (901 views)
Permalink
Re: Django Error: IOError: error waiting for wsgi.input data [In reply to]

Is it SSL? And for Chrome 16 users?
If so, it's because of
http://code.google.com/p/cherokee/issues/detail?id=1284

I've had to change webserver on a production host already because of that
"fun" little problem :(

-Mikael

2011/12/20 David Mohl <david.mohl [at] hotmail>

> Hey !
> First of all, i'm not quite sure if this is the right place for my
> problem. Tho it's only cheorkee related.
>
> For about 1 weeks i'm getting a django error when trying to access my page
> via post. The page is embedded in facebooks app-canvas. Means facebook
> posts some data every time someone accesses the page.
>
> The problem occurs only in chrome as far as i can tell.
> The handler itself is a simple uwsgi handler, using the following command:
> "/usr/local/bin/uwsgi -s 127.0.0.1:58547 -x
> /var/www/apps/myapp/uwsgi.xml"
>
> Stack Trace:
> (...)
> File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
> line 210, in _get_post
> self._load_post_and_files()
>
> File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
> line 289, in _load_post_and_files
> self._post, self._files = QueryDict(self.raw_post_data,
> encoding=self._encoding), MultiValueDict()
>
> File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
> line 249, in _get_raw_post_data
> self._raw_post_data = self.read(content_length)
>
> File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
> line 301, in read
> return self._stream.read(*args, **kwargs)
>
> IOError: error waiting for wsgi.input data
>
>
> UWSGI Output:
> 'uwsgi.node': 'prismriver',
> 'uwsgi.version': '0.9.9.2',
> 'wsgi.errors': <open file 'wsgi_input', mode 'w' at 0x271f9c0>,
> 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>,
> 'wsgi.input': <uwsgi._Input object at 0x2213120>,
>
> Tried to change some permission (because of the mode "w"), restarting the
> server, messing around with uwsgi settings but didn't really help.
>
> Am i the only one having this problem?
> It's kind of critial because the application is not usable for chrome
> users anymore.
> The problem occured someday all of a sudden. I didn't change anything on
> the server settings (as far as i can remember).
>
> Any solutions on that?
> Could the chrome 16 release last week be the problem?
>
>
> Regards,
> David
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>


stefan at konink

Dec 20, 2011, 7:14 AM

Post #3 of 6 (899 views)
Permalink
Re: Django Error: IOError: error waiting for wsgi.input data [In reply to]

On Tue, 20 Dec 2011, Mikael TurÝy wrote:

> Is it SSL? And for Chrome 16 users?
> If so, it's because
> of†http://code.google.com/p/cherokee/issues/detail?id=1284†
> I've had to change webserver on a production host already because of that
> "fun" little problem :(

There was a one line workaround also in that bug report :) But I agree, we
must have a real solution.


Stefan


italo.maia at gmail

Dec 20, 2011, 7:17 AM

Post #4 of 6 (902 views)
Permalink
Re: Django Error: IOError: error waiting for wsgi.input data [In reply to]

I'm curious about this one. David, if the problem was really the browser,
please, let us know. I'm getting IOError with cherokee too when I try to
upload files. It would be nice to know if the problems are related.

By the way, do you get this error even if your POST only send plain text?

2011/12/20 Stefan de Konink <stefan [at] konink>

> On Tue, 20 Dec 2011, Mikael Tur√ły wrote:
>
> Is it SSL? And for Chrome 16 users?
>> If so, it's because
>> of http://code.google.com/p/cherokee/issues/detail?id=1284
>> I've had to change webserver on a production host already because of that
>> "fun" little problem :(
>>
>
> There was a one line workaround also in that bug report :) But I agree, we
> must have a real solution.
>
>
> Stefan
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>
> !DSPAM:1,4ef09ed9210131602211600!
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>


--
"A arrog√Ęncia √© a arma dos fracos."

===========================
Italo Moreira Campelo Maia
Bacharel em Ciência da Computação - UECE
Desenvolvedor WEB e Desktop (Java, Python, Lua)
Coordenador do Pug-CE
-----------------------------------------------------
http://www.italomaia.com/
http://twitter.com/italomaia/
http://eusouolobomau.blogspot.com/
-----------------------------------------------------
Turtle Linux 9.10 - http://tiny.cc/blogturtle910
Turtle Linux 10.10 - http://bit.ly/cEw4ET
===========================


tiit at sympatico

Dec 20, 2011, 8:38 AM

Post #5 of 6 (903 views)
Permalink
Re: Django Error: IOError: error waiting for wsgi.input data [In reply to]

Hi,

I have the same problem. I'm pretty sure the problem is with Chrome latest version (16). I have no problem with Chrome 15.

If I look at the POST data in Chrome 16 it looks like that:

POST https://www.example.com/admin/ HTTP/1.1
Origin: https://www.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: https://www.example.com/admin/


And in Chrome 15:

POST /admin/ HTTP/1.1
Host: www.example.com
Connection: keep-alive
Content-Length: 112
Cache-Control: max-age=0
Origin: https://www.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: https://www.example.com/admin/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __unam=3813975-13124e9cb4f-7fd21401-1; __utma=226797841.1469815294.1310584327.1316098189.1322619655.5; __utmz=226797841.1322616655.5.2.utmcsr=www.example.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=9258313.966017050.1316113839.1323664718.1324069816.17; __utmz=9258313.1316113839.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); csrftoken=29806a534893e8691956e77771bb3275; sessionid=d945d23a4900fb313a5bd70504cd7210


I'll look if there's a bug report in Chrome tracker and if not, I will add one.

Etienne
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


david.mohl at hotmail

Dec 21, 2011, 7:48 AM

Post #6 of 6 (906 views)
Permalink
Re: Django Error: IOError: error waiting for wsgi.input data [In reply to]

Hey,

@michael: yep, problem occurs only when using SSL and post.
Setted up a little test page to reproduce the problem -
https://personalitycores.com/test/

Setted up using the following:
Django and uwsgi handler as explained above
Debug: False
CSRF middleware deactivated

If you see the 500 cherokee page, it's working as supposed.
"No Data Received" means it does not work with your browser.

View:
def test(request):
if request.method == 'POST':
test = request.POST['test']
assert False
return render_to_response("bugtest.html")

Html:
<form action="/test/" method="post">
<p>Value 1: <input type="text" name="test"></p>
<input type="submit" name="" value="Submit">
</form>

Works on Firefox, Safari, Opera
Breaks on: Chrome 16

Is there a workaround using uwsgi?


Regards,
David

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.