lichess-org / lila-openingexplorer

Opening explorer for lichess.org that can handle all the variants and trillions of unique positions

Home Page:http://lichess.org/analysis#explorer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Too many open files"

Camsbury opened this issue · comments

Trying to import games and running into the following:

stack backtrace:
   0:     0x55c566c3f933 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he3010f3ff51b55ac
   1:     0x55c566c7204c - core::fmt::write::hdfaf46c08a67cd92
   2:     0x55c566c57305 - std::io::Write::write_fmt::h0c8cb8452451d559
   3:     0x55c566c5cd44 - std::panicking::default_hook::{{closure}}::h5f89d231703325b8
   4:     0x55c566c5c984 - std::panicking::default_hook::h0daa4414d4591360
   5:     0x55c566c5d323 - std::panicking::rust_panic_with_hook::hc7eecadc23f906e1
   6:     0x55c566c3fc97 - std::panicking::begin_panic_handler::{{closure}}::h425c6c4810da3633
   7:     0x55c566c3fa74 - std::sys_common::backtrace::__rust_end_short_backtrace::h75a4c4b09ed50e09
   8:     0x55c566c5d012 - rust_begin_unwind
   9:     0x55c566207103 - core::panicking::panic_fmt::hed5cc02befa9fbd6
  10:     0x55c566207233 - core::result::unwrap_failed::he50d59caf960046c
  11:     0x55c56627aa76 - lila_openingexplorer::importer::LichessImporter::import_many::h74943e7370a315c5
  12:     0x55c5662c5804 - <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll::hec72fd9f54a3e6c3
  13:     0x55c5662e5eab - tokio::runtime::task::core::Core<T,S>::poll::hc35e61d89eb7e1b9
  14:     0x55c56629aec1 - tokio::runtime::task::harness::Harness<T,S>::poll::h5ff2d742e4132d91
  15:     0x55c566c00c81 - tokio::runtime::blocking::pool::Inner::run::h70115c4a136702e6
  16:     0x55c566c0406a - std::sys_common::backtrace::__rust_begin_short_backtrace::hf6a191b3ce6d331e
  17:     0x55c566c180ef - core::ops::function::FnOnce::call_once{{vtable.shim}}::h740b2f8e62dfc32f
  18:     0x55c566c467c3 - std::sys::unix::thread::Thread::new::thread_start::h66ef298d653bf46c
  19:     0x7f5666e4ce86 - start_thread
  20:     0x7f5666ed3ce0 - clone3
  21:                0x0 - <unknown>
thread 'tokio-runtime-worker' panicked at 'blocking lichess import: JoinError::Panic(Id(8140), ...)', src/main.rs:494:10
stack backtrace:
   0:     0x55c566c3f933 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he3010f3ff51b55ac
   1:     0x55c566c7204c - core::fmt::write::hdfaf46c08a67cd92
   2:     0x55c566c57305 - std::io::Write::write_fmt::h0c8cb8452451d559
   3:     0x55c566c5cd44 - std::panicking::default_hook::{{closure}}::h5f89d231703325b8
   4:     0x55c566c5c984 - std::panicking::default_hook::h0daa4414d4591360
   5:     0x55c566c5d323 - std::panicking::rust_panic_with_hook::hc7eecadc23f906e1
   6:     0x55c566c3fc97 - std::panicking::begin_panic_handler::{{closure}}::h425c6c4810da3633
   7:     0x55c566c3fa74 - std::sys_common::backtrace::__rust_end_short_backtrace::h75a4c4b09ed50e09
   8:     0x55c566c5d012 - rust_begin_unwind
   9:     0x55c566207103 - core::panicking::panic_fmt::hed5cc02befa9fbd6
  10:     0x55c566207233 - core::result::unwrap_failed::he50d59caf960046c
  11:     0x55c56635e8af - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h02a6978e7603724e
  12:     0x55c5662eee24 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h1bbc49554d20256e
  13:     0x55c5662efadb - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hed9da083caea4c4f
  14:     0x55c5662f0419 - <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll::h690d5be9c4f3f647
  15:     0x55c566341a2b - <tower::util::oneshot::Oneshot<S,Req> as core::future::future::Future>::poll::h006fa53fc05555e1
  16:     0x55c5662966e8 - hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop::h49f856b6110d43b6
  17:     0x55c5662941fd - hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch::hb32a0645adcda992
  18:     0x55c566239290 - <hyper::server::conn::upgrades::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll::h0f7c642100d04872
  19:     0x55c566274f40 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::h1cd06f41b61572e9
  20:     0x55c5662e5fbb - tokio::runtime::task::core::Core<T,S>::poll::hc45a4b078b7b0db6
  21:     0x55c56629d836 - tokio::runtime::task::harness::Harness<T,S>::poll::hf01fe27d0ecf554e
  22:     0x55c566c12d3a - tokio::runtime::scheduler::multi_thread::worker::Context::run_task::hd09057b05290498b
  23:     0x55c566c12303 - tokio::runtime::scheduler::multi_thread::worker::Context::run::h2d9128fdc52790d6
  24:     0x55c566c06289 - tokio::macros::scoped_tls::ScopedKey<T>::set::h1f685379eff10645
  25:     0x55c566c11d91 - tokio::runtime::scheduler::multi_thread::worker::run::h00d0a74022567ccc
  26:     0x55c566bfaf82 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::h82db8d5067e93fa9
  27:     0x55c566c1bace - tokio::runtime::task::core::Core<T,S>::poll::h4d174779fb3c9af5
  28:     0x55c566c19fdf - tokio::runtime::task::harness::Harness<T,S>::poll::h4ec0bd54c000bead
  29:     0x55c566c00c81 - tokio::runtime::blocking::pool::Inner::run::h70115c4a136702e6
  30:     0x55c566c0406a - std::sys_common::backtrace::__rust_begin_short_backtrace::hf6a191b3ce6d331e
  31:     0x55c566c180ef - core::ops::function::FnOnce::call_once{{vtable.shim}}::h740b2f8e62dfc32f
  32:     0x55c566c467c3 - std::sys::unix::thread::Thread::new::thread_start::h66ef298d653bf46c
  33:     0x7f5666e4ce86 - start_thread
  34:     0x7f5666ed3ce0 - clone3
  35:                0x0 - <unknown>

It keeps occurring when I restart the service and attempt to index again. This is specifically with the March 2016 data if that helps.

The server needs to create many table files under _db. Can you please try ulimit -n 100000 to override your default operating system limit (in the same shell that will run the server, before starting it), and report back if it helps?

This fixes it! Thank you very much.