On Oct 16, 1:24 am, Wayne Witzel <[EMAIL PROTECTED]> wrote:
> Anyone else experiencing this error? I am getting WebApp Error mails,
> the error occurs 5-10 times a day on my production site. Unable to
> find a pattern or reproduce it. Currently running under Apache 2.2 
> andmod_wsgiwith the 0.9.6 version of Pylons.
>
> From looking at the error, it seems as if the request is made by the
> client and in the process or doing so the connection is aborted before
> it can complete?

Yep. Can happen if user aborts request, presses reload etc, while
upload still occurring.

Its one of those things that can happen and depending on what the
request handler is doing, it would need to be tolerant to it. For
example, if handler has acquired resources it would need to release
them when exception propagated back. Or, if it was saving data into
temporary file for later processing, it should perhaps then remove the
temporary file.

In other words, you can't assume that reading request content from a
client is always going to succeed. Actions by the client, or any range
of network issues could cause a failure to read input. Unfortunately
in WSGI specification there is no standardised exception which should
be raised when there is a problem reading data from wsgi.input. Most
WSGI hosting mechanisms would raise an IOError, but that is
necessarily guaranteed.

Graham

> Search around, best I found I was an open ticket that might be
> related:http://trac.pythonpaste.org/pythonpaste/ticket/221
>
> Module paste.exceptions.errormiddleware:137 in __call__
> <<          try:
>                 __traceback_supplement__ = Supplement, self, environ
>                 app_iter = self.application(environ, start_response)
>                 return self.make_catching_iter(app_iter, environ)
>             except:>>  app_iter = self.application(environ,
> start_response)
> Module pylons.wsgiapp:315 in __call__
> <<      def __call__(self, environ, start_response):
>             environ['pylons.environ_config'] = self.econf
>             return self.app(environ, start_response)>>  return
> self.app(environ, start_response)
> Module beaker.cache:180 in __call__
> <<              environ['paste.registry'].register(self.cache,
> self.cache_manager)
>             environ[self.environ_key] = self.cache_manager
>             return self.app(environ, start_response)>>  return
> self.app(environ, start_response)
> Module beaker.session:405 in __call__
> <<              return start_response(status, headers, exc_info)
>             try:
>                 response = self.wrap_app(environ,
> session_start_response)
>             except:
>                 ty, val = sys.exc_info()[:2]>>  response =
> self.wrap_app(environ, session_start_response)
> Module routes.middleware:58 in __call__
> <<                  log.debug("_method found in QUERY_STRING, altering
> request"
>                               " method to %s",
> environ['REQUEST_METHOD'])
>                 elif is_form_post(environ) and '_method' in req.POST:
>                     old_method = environ['REQUEST_METHOD']
>                     environ['REQUEST_METHOD'] =
> req.POST['_method'].upper()>>  elif is_form_post(environ) and
> '_method' in req.POST:
> Module paste.wsgiwrappers:213 in POST
> <<          ``charset`` is set.
>             """
>             params = self._POST()
>             if self.charset:
>                 params = UnicodeMultiDict(params,
> encoding=self.charset,>>  params = self._POST()
> Module paste.wsgiwrappers:195 in _POST
> <<
>         def _POST(self):
>             return parse_formvars(self.environ,
> include_get_vars=False)
>
>         def POST(self):>>  return parse_formvars(self.environ,
> include_get_vars=False)
> Module paste.request:174 in parse_formvars
> <<      fs = cgi.FieldStorage(fp=input,
>                               environ=environ,
>                               keep_blank_values=1)
>         environ['QUERY_STRING'] = old_query_string
>         if fake_out_cgi:>>  keep_blank_values=1)
> Module cgi:532 in __init__
> <<          self.done = 0
>             if ctype == 'application/x-www-form-urlencoded':
>                 self.read_urlencoded()
>             elif ctype[:10] == 'multipart/':
>                 self.read_multi(environ, keep_blank_values,
> strict_parsing)>>  self.read_urlencoded()
> Module cgi:637 in read_urlencoded
> <<      def read_urlencoded(self):
>             """Internal: read data in query string format."""
>             qs = self.fp.read(self.length)
>             self.list = list = []
>             for key, value in parse_qsl(qs, self.keep_blank_values,>>
> qs = self.fp.read(self.length)
> IOError: request data read error
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to