Git Product home page Git Product logo

Comments (2)

greenaddress avatar greenaddress commented on July 28, 2024

@duckartes maybe try this diff applied to master

diff --git i/src/bulk.rs w/src/bulk.rs
index 54bc3b2..b7408ed 100644
--- i/src/bulk.rs
+++ w/src/bulk.rs
@@ -151,6 +151,25 @@ fn load_headers(daemon: &Daemon) -> Result<HeaderList> {
     Ok(headers)
 }
 
+#[cfg(target_pointer_width = "32")]
+fn set_open_files_limit(limit: u32) {
+    let resource = libc::RLIMIT_NOFILE;
+    let mut rlim = libc::rlimit {
+        rlim_cur: 0,
+        rlim_max: 0,
+    };
+    let result = unsafe { libc::getrlimit(resource, &mut rlim) };
+    if result < 0 {
+        panic!("getrlimit() failed: {}", result);
+    }
+    rlim.rlim_cur = limit; // set softs limit only.
+    let result = unsafe { libc::setrlimit(resource, &rlim) };
+    if result < 0 {
+        panic!("setrlimit() failed: {}", result);
+    }
+}
+
+#[cfg(target_pointer_width = "64")]
 fn set_open_files_limit(limit: u64) {
     let resource = libc::RLIMIT_NOFILE;
     let mut rlim = libc::rlimit {

patch.txt

from electrs.

romanz avatar romanz commented on July 28, 2024

Thanks for reporting this issue!
Fixed a bit differently at 4f8d83f.

from electrs.

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.