Forum OpenACS Development: Re: Naviserver File download cancelled around 500k

Posted by Gustaf Neumann on
Dear Dave,

i can help you more, when you answer my questions:

  • Does the truncation happen as well with downloads from the file-storage?
  • Do you have writer threads configured?
  • What version of NaviServer do you use?

From you reply is see just cases, where the debug output shows log lines from the input side (from different ip addresses). i would recommend to add ns_log entries before and after the ns_return statement when you send the CSV file.

What exactly is "an Amazon ECB"? I assume this is something like a reverse proxy. It the communication via SSL? How does your comment with the 504 error (usually this means "no response from upstream server") fit together with the partial result of the 500k. I can't believe you get a truncated result in the body the 504 error reply.

Do you see an entry for the request in the access.log?

Posted by Dave Bauer on
Thanks Gustaf,

It does appear the proxy is expecting a complete response within about 15 seconds and if the reply is not completed it responds with 504 to the client. I am trying to get the administrator of the proxy to give me information about what happens there.

Posted by Gustaf Neumann on
It seems, that there are more things to know to address the problem. If the result is sent via ns_return, then the problem will only appear when it takes the program more than 15 secs to generate the output. In this case, this has nothing to do with NaviServer.

Maybe it is an option for you to produce streaming output (via ns_write) as soon as you have partial results available. Most proxies send the "backend unresponsive" only when they receive no upstream output after the timeout.