We're updating the issue view to help you get more done. 

'Too Many Open Files' error when the DMR++ handler is run on many variables (60+), or for many repetitions (60+)

Description

Based on the error logs, it could be here, since this is the only call to curl_easy_strerror() that is not prefixed with some identifying string.

1 2 CURLcode res = curl_easy_setopt(handle->d_handle, CURLOPT_URL, chunk->get_data_url().c_str()); if (res != CURLE_OK) throw BESInternalError(string(curl_easy_strerror(res)), __FILE__, __LINE__);

inside

1 2 3 4 dmrpp_easy_handle * CurlHandlePool::get_easy_handle(Chunk *chunk) { }

But that is not the case. It's actually

1 2 2018-10-04T00:37:52GMT|&|1863|&|ERROR: BES Internal Error: Too many open files (BES error code: 1). 2018-10-04T00:37:52GMT|&|1863|&| at: BESFileLockingCache.cc:493

(I changed how BESError objects are logged when Verbose logging is turned on.)

This is error comes from:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 static bool getSharedLock(const string &file_name, int &ref_fd) { BESDEBUG("cache2", "getSharedLock(): Acquiring cache read lock for " << file_name <<endl); int fd; if ((fd = open(file_name.c_str(), O_RDONLY)) < 0) { switch (errno) { case ENOENT: return false; default: throw BESInternalError(get_errno(), __FILE__, __LINE__); } } ... }

I will change the BESDEBUG lines so that we can track lock/unlock operations and re-run the tests.

Environment

None

Status

Assignee

James Gallagher

Reporter

James Gallagher

Labels

None

Fix versions

Story Points

None

Epic Link

Priority

Highest