Re: django 1.3 timing out on empty POST request
Hello Roberto, it looks like upgrading to uWSGI 0.9.8.1 solved the issue. Thanks for your help! On Jun 27, 9:18 pm, Roberto De Ioriswrote: > Il giorno 27/giu/2011, alle ore 22.07, mehdi ait oufkir ha scritto: > > > Roberto, I'm actually using uWSGI 0.9.6.5. > > > Can you tell me what is the issue with the previous version. I can > > stop by on uwsgi IRC if you want to take the conversation off google's > > groups. > > > -mehdi > > Versions < 0.9.8 expect a fully compliant (read: very simple) WSGI behaviour. > > Actually the world is a bit more complex than this so in 0.9.8 i added a more > "tolerant" > wsgi.input object. (pratically it is the same technic of mod_wsgi for apache > with some addition) > > Upgrading to 0.9.8.1 can bypass the issue or eventually throw an error > pointing to what it is wrong > in django code. > > > > > > > > > On Jun 26, 9:47 pm, "Roberto De Ioris" wrote: > >>> Roberto, > > >>> it is uWSGI, but can you explain a bit more what the post-buffering > >>> would help me do? > >>> Would it help me debug with pdb? > >>> -mehdi > > >> Before starting a pretty long and boring explanation, can you double check > >> if you are using the 0.9.8.1 version of uWSGI ? It should manage POST data > >> in a safer way avoiding blocking calls. > > >> -- > >> Roberto De Iorishttp://unbit.it > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-users@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. > > -- > Roberto De Iorishttp://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
Il giorno 27/giu/2011, alle ore 22.07, mehdi ait oufkir ha scritto: > Roberto, I'm actually using uWSGI 0.9.6.5. > > Can you tell me what is the issue with the previous version. I can > stop by on uwsgi IRC if you want to take the conversation off google's > groups. > > -mehdi Versions < 0.9.8 expect a fully compliant (read: very simple) WSGI behaviour. Actually the world is a bit more complex than this so in 0.9.8 i added a more "tolerant" wsgi.input object. (pratically it is the same technic of mod_wsgi for apache with some addition) Upgrading to 0.9.8.1 can bypass the issue or eventually throw an error pointing to what it is wrong in django code. > > On Jun 26, 9:47 pm, "Roberto De Ioris"wrote: >>> Roberto, >> >>> it is uWSGI, but can you explain a bit more what the post-buffering >>> would help me do? >>> Would it help me debug with pdb? >>> -mehdi >> >> Before starting a pretty long and boring explanation, can you double check >> if you are using the 0.9.8.1 version of uWSGI ? It should manage POST data >> in a safer way avoiding blocking calls. >> >> -- >> Roberto De Iorishttp://unbit.it > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Roberto De Ioris http://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
(not sure if my previous message went through). Roberto, I'm using uWSGI 0.9.6.5. Can you tell me a bit more about the issue? and why this is happening only with 1.3. We can take the conversation of google group if you want. I can join the #uwsgi irc. Please let me know, -mehdi On Jun 26, 9:47 pm, "Roberto De Ioris"wrote: > > Roberto, > > > it is uWSGI, but can you explain a bit more what the post-buffering > > would help me do? > > Would it help me debug with pdb? > > -mehdi > > Before starting a pretty long and boring explanation, can you double check > if you are using the 0.9.8.1 version of uWSGI ? It should manage POST data > in a safer way avoiding blocking calls. > > -- > Roberto De Iorishttp://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
Roberto, I'm actually using uWSGI 0.9.6.5. Can you tell me what is the issue with the previous version. I can stop by on uwsgi IRC if you want to take the conversation off google's groups. -mehdi On Jun 26, 9:47 pm, "Roberto De Ioris"wrote: > > Roberto, > > > it is uWSGI, but can you explain a bit more what the post-buffering > > would help me do? > > Would it help me debug with pdb? > > -mehdi > > Before starting a pretty long and boring explanation, can you double check > if you are using the 0.9.8.1 version of uWSGI ? It should manage POST data > in a safer way avoiding blocking calls. > > -- > Roberto De Iorishttp://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
> Roberto, > > it is uWSGI, but can you explain a bit more what the post-buffering > would help me do? > Would it help me debug with pdb? > -mehdi Before starting a pretty long and boring explanation, can you double check if you are using the 0.9.8.1 version of uWSGI ? It should manage POST data in a safer way avoiding blocking calls. -- Roberto De Ioris http://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
Roberto, it is uWSGI, but can you explain a bit more what the post-buffering would help me do? Would it help me debug with pdb? -mehdi On Jun 25, 11:32 am, "Roberto De Ioris"wrote: > > @Karen, I tried the patch, and it doesn't seem to help. Do you have > > any ideas when is the1.3.X scheduled to be released? > > > @Bruno, using nginx + WSGI +DJANGOis the setup. > > If you mean mod_wsgi for nginx, i am not able to help you, but if you mean > nginx + uWSGI, you will probably only need to enable post-buffering in > uWSGI (--post-buffering 4096 will be enough). > > Remember to use 0.9.8.1 (latest stable) as it contains a much better > wsgi.input implementation. > > > > -- > Roberto De Iorishttp://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
> @Karen, I tried the patch, and it doesn't seem to help. Do you have > any ideas when is the 1.3.X scheduled to be released? > > @Bruno, using nginx + WSGI + DJANGO is the setup. If you mean mod_wsgi for nginx, i am not able to help you, but if you mean nginx + uWSGI, you will probably only need to enable post-buffering in uWSGI (--post-buffering 4096 will be enough). Remember to use 0.9.8.1 (latest stable) as it contains a much better wsgi.input implementation. > -- Roberto De Ioris http://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
@Karen, I tried the patch, and it doesn't seem to help. Do you have any ideas when is the 1.3.X scheduled to be released? @Bruno, using nginx + WSGI + DJANGO is the setup. -mehdi On Jun 25, 8:56 am, bruno desthuillierswrote: > On Jun 25, 10:27 am, mehdi ait oufkir wrote: > > > Thanks for the response Bruno. > > > Your comment made me think I forgot to mention that the issue only > > happens in production when django is behind nginx. > > Duh... > > > I'm not sure how to run pdb in this context. > > Don't know if you can (no experience with nginx). > > > Any ideas where else to look? > > Anywhere between Django and nginx - which makes quite a few LOCs. > What's your setup ? nginx + FCGI ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
On Jun 25, 10:27 am, mehdi ait oufkirwrote: > Thanks for the response Bruno. > > Your comment made me think I forgot to mention that the issue only > happens in production when django is behind nginx. Duh... > I'm not sure how to run pdb in this context. Don't know if you can (no experience with nginx). > Any ideas where else to look? Anywhere between Django and nginx - which makes quite a few LOCs. What's your setup ? nginx + FCGI ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
On Sat, Jun 25, 2011 at 4:27 AM, mehdi ait oufkirwrote: > Thanks for the response Bruno. > > Your comment made me think I forgot to mention that the issue only > happens in production when django is behind nginx. > I'm not sure how to run pdb in this context. > Any ideas where else to look? > I'd first try running with current 1.3.X branch code. This ticket: https://code.djangoproject.com/ticket/15679 sounds like it might be related, and has been fixed on the 1.3.X maintenance branch. Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
Thanks for the response Bruno. Your comment made me think I forgot to mention that the issue only happens in production when django is behind nginx. I'm not sure how to run pdb in this context. Any ideas where else to look? -mehdi On Jun 24, 11:37 am, bruno desthuillierswrote: > On Jun 24, 7:19 pm, mehdi ait oufkir wrote: > > > > > def cleanup_request(request): > > """ > > Removes `oauth_` keys from various dicts on the > > request object, and returns the sanitized version. > > """ > > for method_type in ('GET', 'PUT', 'POST', 'DELETE'): > > if method_type == "POST": > import pdb; pdb.set_trace() > > > block = getattr(request, method_type, { }) > > Then you start the dev server, send a POST request with an empty body, > and step thru the code until you find out what's happening. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
On Jun 24, 7:19 pm, mehdi ait oufkirwrote: > > def cleanup_request(request): > """ > Removes `oauth_` keys from various dicts on the > request object, and returns the sanitized version. > """ > for method_type in ('GET', 'PUT', 'POST', 'DELETE'): if method_type == "POST": import pdb; pdb.set_trace() > block = getattr(request, method_type, { }) Then you start the dev server, send a POST request with an empty body, and step thru the code until you find out what's happening. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
Sorry for the typo, in the previous post. here is the full method (in comes from piston's code). def cleanup_request(request): """ Removes `oauth_` keys from various dicts on the request object, and returns the sanitized version. """ for method_type in ('GET', 'PUT', 'POST', 'DELETE'): block = getattr(request, method_type, { }) if True in [ k.startswith("oauth_") for k in block.keys() ]: sanitized = block.copy() for k in sanitized.keys(): if k.startswith("oauth_"): sanitized.pop(k) setattr(request, method_type, sanitized) return request The call blocks on method_type = "POST" if the request is a POST request with an empty body. -mehdi On Jun 24, 12:51 am, Ivo Brodienwrote: > On Jun 24, 2011, at 2:40 AM, mehdi ait oufkir wrote: > > > block = getattr(request, POST, { }) > > shouldn’t it be: > > block = getattr(request, ‘POST', { }) ? > > What are you trying to do? Can you post the rest of the view function? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django 1.3 timing out on empty POST request
On Jun 24, 2011, at 2:40 AM, mehdi ait oufkir wrote: > block = getattr(request, POST, { }) shouldn’t it be: block = getattr(request, ‘POST', { }) ? What are you trying to do? Can you post the rest of the view function? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.