Anyone, willing to support you, might need your error routing code to help you more, as you wrote that the built-in ticket system works just fine.
13 Ocak 2015 Salı 19:29:28 UTC+2 tarihinde Louis Amon yazdı: > > @Niphlod: > > I've simplified my error handler as far as this : > > No models, controller has 2 lines : > > def index(): > return dict() > > The result is still the same : web2py stalling forever, no page displayed. > > > @Derek: > I'm developping on a MacOSX computer but my server is hosted on Heroku > (probably some kind of Linux distribution) : the problem is the same on > both environments. > > I can't make my server run locally on any other server than rocket right > now (and never had to so far). I'll have to look into that if the problem > persists. > > @Massimo: > > I'm using this version: > 2.9.11-stable+timestamp.2014.09.15.23.35.11 > (Running on Rocket 1.2.6, Python 2.7.9) > > The controller in question is just some error handler I made that > automatically (and synchroneously) sends tickets as e-mails to > administrators. This is due to Heroku having an ephemeral filesystem : you > can't rely on tickets being stored on the filesystem for any length of time. > > @cem: > > The controller I built was based on this slice > <http://www.web2pyslices.com/slice/show/1529/custom-error-routing>, so it > has the 2 lines that should prevent an infinite error loop : > > > > * 1. if code is not None and request_url != request.url: # Make sure error > url is not current url to avoid infinite loop.2. response.status = > int(code) # Assign the error status code to the current response. (Must be > integer to work.)* > > > > On Sunday, January 4, 2015 at 6:38:18 PM UTC+1, Niphlod wrote: >> >> the point of routes_onerror is EXACTLY to "intercept" the error and >> somewhat process it to display a nicer page to the end-user. I'd guess at >> this point that your controller handling the error has some bugs in it: >> would you care to trim it to the bare minimum to see if the error is in >> handling the "original" error ? >> >> On Sunday, January 4, 2015 12:56:54 AM UTC+1, Louis Amon wrote: >>> >>> I've tested the native error handler (working fine) versus my custom >>> error handler (generating HTTP 400 error + web2py stuck) : >>> >>> The main difference between the two is that the native error handler >>> doesn't generate an additional request while routes_onerror seems to >>> generate an additional request that points to my error handler. >>> >>> This second request goes through *copystream_progress* just fine, then >>> calls *copystream* (at line 125 in globals.py). >>> >>> In *copystream*, it gets stuck at line 465 in fileutils.py : >>> >>> data = src.read(size) >>> >>> This call to 'read' eventually times out. >>> >>> I've tried catching the error like this : >>> >>> try: >>> data = src.read(size) >>> except Exception as e: >>> print type(e), e >>> >>> All it ever prints (after 10 seconds) is : >>> >>> <class 'socket.timeout'> timed out >>> >>> >>> How can I further investigate this matter ? >>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.