This webpage has a redirect loop

Just wondering if anyone else has been experiencing this error today. When I went to bed last night, all was well in my virtual world - this morning, all attempts to load any of my web2py controllers fail with this server error.


Hi there, are there any clues in your error log?

When we deploy a new server cluster, an app that's never been run on that server needs to go thru an initialization phase, which happens via a redirect... If your app is returning error codes, then the page can get stuck in a loop.

So, is there any reason your app would be returning anything other than an OK response / 200 status code?

Hi geoffham -- we did see something similar with someone else's web app earlier on today; it was fixed by reloading the app. I tried to access your site just now; the first time, I got the same error as you, but the second time it worked. Does it look OK to you now?

Nothing in the error log (well, some stuff from when I was troubleshooting earlier yesterday, but nothing since). And the access log doesn't even show the attempts to load the pages today.

All that said, the problem disappeared when I reloaded the web2py Webapp, so I guess that's the fix. But once we've got this application deployed, I'd hate for our customers to get this error without us knowing about it. Problem for down the road, anyway.

Whoa - we cross-posted. I guess you were accessing my page just over the time before and after I reloaded the web app.

Sounds likely! We're looking into the problem now; we've determined that it's definitely not framework-dependent -- we've seen it on one of each of Django, Flask and web2py. But beyond that, no news. We'll keep you posted...

Aha! We've worked out the cause -- it looks like when after our update today, if someone visits the "Files" page in PythonAnywhere before anyone happens to have visited their website, it will get into a nasty state. The fix is simple enough, we're just putting it in now.

OK, that's done. Everyone's web apps should be running smoothly now -- let us know if not!