Giter Club home page Giter Club logo

Comments (4)

lesserwhirls avatar lesserwhirls commented on August 17, 2024

Great question! I believe this particular call is only used in a few places where the size will be much smaller than 2 GB (such as serving a catalog response in html or xml). There are other places in the code, like here that explicitly handle larger transfers, such as HTTPServer requests. In those cases, I can confirm the correct bytes transferred size will show up in threddsServlet.log. That said, because this isn't handled uniformly in the codebase, I would not be too surprised if what you describe above happens for some protocols/cases. Do you have a case where you see this behavior happening?

from thredds.

nathanlcarlson avatar nathanlcarlson commented on August 17, 2024

I have found it by parsing logs from the past few years looking for primarily transactions that match /thredds/fileServer/.....nc.

That line you linked will set the 'Content-Length' header, but it leaves the httpResponseBodyLength member in TdsServletResponseWrapper untouched. So, any time contentLength > Integer.MAX_VALUE the log will report -1 for the size, as I understand it.

The member/class that is used to report to "Request Completed" entries in the threddsServlet.log.
https://github.com/Unidata/thredds/blob/v5.0.0-beta5/tds/src/main/java/thredds/servlet/filter/TdsServletResponseWrapper.java#L23

Where the httpResponseBodyLength member is used.

log.info(UsageLog.closingMessageForRequestContext(response.getHttpStatusCode(), response.getHttpResponseBodyLength()));

from thredds.

lesserwhirls avatar lesserwhirls commented on August 17, 2024

Ah, thank you! I think I see now. We normally parse the Apache logs to get stats on how much data our TDS instances serve, but we should try to accurately capture that in the threddsServlet logs as well. I'll be out of the office for the next few weeks, but I can take a look again once I get back (unless @ethanrd wants to give this a look).

from thredds.

nathanlcarlson avatar nathanlcarlson commented on August 17, 2024

That is what we have arrived at as well, using the Apache logs.

from thredds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.