Merge pull request #3310 from nanocurrency/warning-log-for-fds-count
Warn if the limit for open FDs is lower than recommended
This commit is contained in:
commit
ba24a5d0a3
1 changed files with 9 additions and 1 deletions
|
@ -73,7 +73,15 @@ void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::
|
|||
logger.always_log (initialization_text);
|
||||
|
||||
nano::set_file_descriptor_limit (OPEN_FILE_DESCRIPTORS_LIMIT);
|
||||
logger.always_log (boost::format ("Open file descriptors limit is %1%") % nano::get_file_descriptor_limit ());
|
||||
const auto file_descriptor_limit = nano::get_file_descriptor_limit ();
|
||||
if (file_descriptor_limit < OPEN_FILE_DESCRIPTORS_LIMIT)
|
||||
{
|
||||
logger.always_log (boost::format ("WARNING: open file descriptors limit is %1%, lower than the %2% recommended. Node was unable to change it.") % file_descriptor_limit % OPEN_FILE_DESCRIPTORS_LIMIT);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.always_log (boost::format ("Open file descriptors limit is %1%") % file_descriptor_limit);
|
||||
}
|
||||
|
||||
auto node (std::make_shared<nano::node> (io_ctx, data_path, config.node, opencl_work, flags));
|
||||
if (!node->init_error ())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue