If you want to try putting a fix in *plus/web/request, give this a try:
A few lines ahead of your error, you should see a line where r$ being cleared (just before the while loop). Try adding o=0 (reset variable o to zero) to that line. The line will then look like this:
Basically, this ensures o is reset each time the while loop is encountered. In the normal flow, that is not very critical. However, if a redirect is encountered and the read record inside the while loop times out, I could see that causing the error 47.