Coder Social home page Coder Social logo

Timeout causing panic about monolith HOT 12 CLOSED

y2z avatar y2z commented on August 19, 2024
Timeout causing panic

from monolith.

Comments (12)

snshn avatar snshn commented on August 19, 2024 2

@TerminusBot I've added a new flag (-t/--timeout) and bumped the timeout to be 30 seconds by default in #114. I believe that should resolve this problem once and for all. Please let me know if 30 seconds is enough.

from monolith.

TerminusBot avatar TerminusBot commented on August 19, 2024 1

I just set the timeout 60 and it works very well now.

from monolith.

snshn avatar snshn commented on August 19, 2024 1

@TerminusBot I bumped it to 120 seconds, that seems to be what Chrome and FF are doing regarding network request timeout. If you do -t 0 it'll be infinite. Please let me know if there's anything else that I could improve!

from monolith.

snshn avatar snshn commented on August 19, 2024

Thank you for the heads up, I'll try to increase the default timeout as well as handle this panic better.

from monolith.

snshn avatar snshn commented on August 19, 2024

Merged #15 in, should be better on slow connections now, but I think the only way to completely resolve this issue would be to handle failing download attempts in a safe manner (e.g. continue retrieving other assets if one fails).

from monolith.

nscooling avatar nscooling commented on August 19, 2024

Thanks, it handling some but still timing out of others

from monolith.

snshn avatar snshn commented on August 19, 2024

I improved the code to treat all network errors as blank responses, this should help saving pages with resources that timeout or throw other kinds of errors. Please let me know if it got rid of the panic. I'm thinking of adding a -t option for setting extended timeout in case of slow Internet connection.

from monolith.

TerminusBot avatar TerminusBot commented on August 19, 2024

thread 'main' panicked at 'called Result::unwrap() on an Err value: reqwest::Error { kind: Decode, source: TimedOut }', src/libcore/result.rs:1165:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

maybe the best solution is retrying if panic happens

from monolith.

snshn avatar snshn commented on August 19, 2024

@TerminusBot it happens for the very first request, right?

from monolith.

TerminusBot avatar TerminusBot commented on August 19, 2024

@snshn totally right

from monolith.

snshn avatar snshn commented on August 19, 2024

I'll look into it this weekend, thank you for the info

from monolith.

TerminusBot avatar TerminusBot commented on August 19, 2024

@TerminusBot I've added a new flag (-t/--timeout) and bumped the timeout to be 30 seconds by default in #114. I believe that should resolve this problem once and for all. Please let me know if 30 seconds is enough.

Sorry, 60 is good enough for me and it works well in production, so I may not test.But you have added the new parameter and we have an easy way to solve this bug.
You have a great job! Monolith helps me a lot. Thanks again!

from monolith.

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.