Skip to content

Commit

Permalink
[DEBUG] Print available_fds
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Dec 18, 2024
1 parent 2851729 commit cead6d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,9 +980,11 @@ bool AppInitParameterInteraction(const ArgsManager& args)

// Try raising the FD limit to what we need (available_fds may be smaller than the requested amount if this fails)
available_fds = RaiseFileDescriptorLimit(user_max_connection + min_required_fds);
std::cerr << __FILE__ << ":" << __LINE__ << " available_fds=" << available_fds << "\n";
// If we are using select instead of poll, our actual limit may be even smaller
#ifndef USE_POLL
available_fds = std::min(FD_SETSIZE, available_fds);
std::cerr << __FILE__ << ":" << __LINE__ << " available_fds=" << available_fds << "\n";
#endif
if (available_fds < min_required_fds)
return InitError(strprintf(_("Not enough file descriptors available. %d available, %d required."), available_fds, min_required_fds));
Expand Down

0 comments on commit cead6d9

Please sign in to comment.