Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some videos download as overweight (giant) files that (1) are not appropriate for schools, and (2) crash Calibre-Web with "502 Bad Gateway" #37

Open
holta opened this issue Nov 15, 2023 · 6 comments · May be fixed by #51
Labels
bug Something isn't working

Comments

@holta
Copy link
Member

holta commented Nov 15, 2023

EXAMPLE: The button "Download to IIAB" was used to download 23m44s video https://youtu.be/sqoOzGMqCQU which eventually downloaded into Calibre-Web (about 6min later... depending on the IIAB's Internet bandwidth of course!)

HOWEVER: Clicking either of the 2 blue buttons below [ "WEBM (4.7GB)" or "Watch in Browser - webm" ] at https://box/live/book/222 appears to cause a serious crash of... all of Calibre-Web? (or some core piece of its infra?)

image

QUESTION: @deldesir what is your technique for bringing NGINX and/or Calibre-Web back to life in these "502 Bad Gateway" situations? (It appears you have a technique to restart some service[s] that does not require a full system reboot?!)

CONTEXT: Just FYI this problem occurred with the latest code (from https://github.com/iiab/calibre-web) installed on a high-powered Ubuntu Server 22.04 VM with 8GB RAM, plenty of disk, and the following kernel...

# uname -a
Linux lrn2 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
@holta holta added the bug Something isn't working label Nov 15, 2023
@holta
Copy link
Member Author

holta commented Nov 15, 2023

Perhaps not directly related (?) but here are 2 other/additional "502 Bad Gateway" problems also needing to be investigated and understood — on the road to robust international resiliency — in support of teachers/students worldwide living in very challenging environments: 💯

  • Calibre-Web software update [upgrade] button does damage: can no longer log in, "502 Bad Gateway" #31
  • "Calibre-Web needs to survive intensive requests demanding lots of RAM (e.g. playing a large video caused “502 Bad Gateway” on ALL pages with a 1GB RAM VM, crash!)"
    • Was that perhaps an isolated failure mode, arising from its under-resourced 1GB RAM Ubuntu VM's "OOM" (out of memory), possibly inducing a Linux/system-level failure?
    • Or will this also affect 2+ GB RAM VMs? (In which case a new/separate ticket may be best, to document/track this as a unique/separate problem!)

@deldesir
Copy link
Collaborator

This is due to excessive RAM usage. I guess implementing a handler for cases like this would be practical unless we limit big-size downloads pre-checking video formats.

@holta
Copy link
Member Author

holta commented Nov 22, 2023

@EMG70 FYI — @deldesir is working very hard to investigate:

  1. Our highest priority is to ensure large downloads (e.g. 3-hour educational documentary films) work very reliably — from Internet/Web to IIAB:

  2. Secondarily, we need to solve reliable file downloads from IIAB to student device ("502 Bad Gateway").

  3. Finally, if Calibre-Web can also make long/large videos playable in browser, that's the lowest priority (of these 3 priorities) but will hopefully be possible eventually, e.g. perhaps using this Video.js approach:

@EMG70
Copy link

EMG70 commented Nov 22, 2023

All noted. Thanks.

@deldesir
Copy link
Collaborator

@EMG70 and @holta, I manage to trick calibre-web to play the video externally to avoid the memory overload. See #51

@holta
Copy link
Member Author

holta commented Dec 23, 2023

Let's keep this ticket open as work progresses around:

Much better community documentation is emerging below — telling "Grandma Gardeners" (a.k.a. Curricular Content experts) how to take the law into their own hands (installing the videos they truly need) — appropriately compressed to their needs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants