fredrikekre / Literate.jl

Simple package for literate programming in Julia
https://fredrikekre.github.io/Literate.jl
Other
534 stars 61 forks source link

RequestError: HTTP/2 302 (Operation too slow ...) in Literate/Documenter build #225

Closed JeffFessler closed 12 months ago

JeffFessler commented 1 year ago

I am using Literate to generate numerous examples for a Julia-based book on Linear Algebra for Data Science, Machine Learning and Signal Processing that Cambridge will publish in 2024. https://github.com/JeffFessler/book-mmaj-demo

Recently I have been getting an intermittent RequestError during the Documenter build in github's cloud, e.g.: https://github.com/JeffFessler/book-mmaj-demo/actions/runs/6117262031/job/16603944390 One demo reads some datafiles from another github site: https://github.com/JeffFessler/book-mmaj-demo/blob/6158afd18633d10dec57965b0c832e4ac87efae4/docs/lit/demos/07/photometric3.jl#L421

It used to typically work, but more recently (perhaps as I have added more demos so the build time has gotten longer?) sometimes it fails with this error (seen in the job output linked above, if it is viewable by others):

│   value = RequestError: HTTP/2 302 (Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds) while requesting https://github.com/yasumat/RobustPhotometricStereo/raw/master/data/bunny/bunny_lambert/image040.npy
└ @ Documenter.Expanders ~/.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl:32
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered an error (:example_block). Terminating build before rendering.

Is there any way to tell Documenter (or the http library it calls) to be more patient in waiting for data from Downloads.download? The default timeout in download is Inf BTW, so I am stumped. Thanks.

JeffFessler commented 1 year ago

Update: I reran the build this evening and it passed (maybe less github load late on a Friday night). So it clearly is a github lag issue. But somehow having a "be patient" for download in a Literate/Documentaion build would sure be helpful.

mortenpi commented 12 months ago

The download call is in your code, not Literate/Documenter, no? I don't think there is much Documenter could do here. And I don't think Literate does any network requests.

JeffFessler commented 12 months ago

Yes, the call is in my code. The error message mentioned @ Documenter.Expanders ~/.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl:32 so I guess I over-estimated how much Documenter can influence waiting times. Now I see that code is just for formatted error printing.

If I'm lucky, maybe someone will stumble on this and offer an idea how to avoid the timeout. But I'll close the issue now. Thanks!

mortenpi commented 12 months ago

I have seen the Operation too slow message in the context of failing Pkg operations I think, and I think others have been hitting it as well. It looks like there is some discussion here (including a potential workaround): https://github.com/JuliaLang/Downloads.jl/issues/168