Skip to content

Commit

Permalink
Bump server file handles soft limit to hard limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Aug 21, 2024
1 parent 8614049 commit f0f6289
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions srv-daemon/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
#include <iostream>
#include <regex>

#include <unistd.h>

#ifdef __linux__
#include <ifaddrs.h>
#include <sys/resource.h>
#endif

#include <unistd.h>

#include <boost/program_options/parsers.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
Expand Down Expand Up @@ -111,6 +112,13 @@ task<bool> Symmetric(const S<Base> &base) {
}

int Main(int argc, const char *const argv[]) {
#ifdef __linux__
rlimit limit;
orc_syscall(getrlimit(RLIMIT_NOFILE, &limit));
limit.rlim_cur = limit.rlim_max;
orc_syscall(setrlimit(RLIMIT_NOFILE, &limit));
#endif

std::vector<std::string> chains;

po::variables_map args;
Expand Down

0 comments on commit f0f6289

Please sign in to comment.