You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rocket server is not able to serve static files that make more than 211MB when running on a raspberry pi 4 with RAM 4Go.
To Reproduce
Use a raspberry pi 4 with 4 GB.
Expected Behavior
The following code is working as expected with my linux PC (ubuntu 22.10) with an AMD FX6300 Six-Core Processor (64bits). With curl or firefox on my local network with ethernet wire, I can download the entire file (4.3GB). But with the raspberry pi 4 with RAM 4GB, (compilation has been done in-situ, so no cross compilation), I can only retrieve the first 211MB.
I have done a similar test with actix_web crate on the same rapsberry pi 4, in the same conditions (same rust version, ...) and the file is fully downloaded.
That sounds really, really weird. I recall there being a tokio/Linux bug related to this not too long ago. Though actix also uses tokio, it doesn't uses Tokio's file type as Rocket does, so this could explain the discrepancy. Could you perhaps try updating your kernel as well as your dependencies (ie cargo update) and see if the issue is still present?
I have upgraded to last raspberry distrib. I have installed the 64-bit version instead of the 32-bit version.
I have fully recompiled (I have launch cargo clean, so I have keep the same cargo.lock, I forget to remove it, then recompile).
It is now working as expected, i.e. no file truncation.
christian@pi4:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
christian@pi4:~ $ uname -a
Linux pi4 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
So I am totally agree with you that there is a problem with this kernel version.
Description
Rocket server is not able to serve static files that make more than 211MB when running on a raspberry pi 4 with RAM 4Go.
To Reproduce
Use a raspberry pi 4 with 4 GB.
Expected Behavior
The following code is working as expected with my linux PC (ubuntu 22.10) with an AMD FX6300 Six-Core Processor (64bits). With curl or firefox on my local network with ethernet wire, I can download the entire file (4.3GB). But with the raspberry pi 4 with RAM 4GB, (compilation has been done in-situ, so no cross compilation), I can only retrieve the first 211MB.
main.rs
Cargo.toml
I look into the documentation in order to check limitations, but limitations are only for upload.
Log of rocket server:
Here the log of the curl download command :
Environment:
Additional Context
The text was updated successfully, but these errors were encountered: