You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/02/24 13:49:47 UTC

[GitHub] [couchdb] big-r81 opened a new pull request #2595: FIX: increase ulimit to successful run js-tests

big-r81 opened a new pull request #2595: FIX: increase ulimit to successful run js-tests
URL: https://github.com/apache/couchdb/pull/2595
 
 
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   During `make check` on macOS (10.13) I encountered the following error:
   ```
   test/javascript/tests/reduce.js                                ported to elixir
   test/javascript/tests/reduce_builtin.js
       Error: {gen_server,call,[<0.17338.0>,{get_state,326},infinity]}
   Trace back (most recent call first):
   
    551: test/javascript/couch.js
         CouchError([object Object])
    514: test/javascript/couch.js
         ([object CouchHTTP])
    180: test/javascript/couch.js
         ("(function (doc) {emit(doc.keys, 1);})/* avoid race cond 158255148995
    167: test/javascript/tests/reduce_builtin.js
         ()
     45: test/javascript/cli_runner.js
         runTest()
     56: test/javascript/cli_runner.js
   
   fail: 1
   =======================================================
   JavaScript tests complete.
     Failed: 1.  Skipped or passed: 39.
   make: *** [Makefile:286: javascript-raw] Fehler 1
   ```
   
   During a discussion with @janl , he pointed out to me that the limit for open files (the maximum number of open file descriptors) is set too low. The default on my machine/os was 256 max open files. In this PR the make script gets the number of the max open file descripters value and if it is lower than 512, the value is increased before the javascript tests are run.
   
   The value is set to 1024 (max open files) to give some upper limit for future usage. It should also run fine with a value of 512.
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   
   To trigger this error:
   ```
   ulimit -n 256
   make javascript
   ```
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] dottorblaster commented on issue #2595: FIX: increase ulimit to successful run js-tests

Posted by GitBox <gi...@apache.org>.
dottorblaster commented on issue #2595: FIX: increase ulimit to successful run js-tests
URL: https://github.com/apache/couchdb/pull/2595#issuecomment-601664140
 
 
   @wohali @janl what's your opinion on this?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali commented on issue #2595: FIX: increase ulimit to successful run js-tests

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2595: FIX: increase ulimit to successful run js-tests
URL: https://github.com/apache/couchdb/pull/2595#issuecomment-601777942
 
 
   A ulimit that low is highly unusual, given the default on Linux has been 1024 fds since 2.6.39. Your PAM/initd might be forcing it lower, but that's more often than not a user _choice_, not an OS default.
   
   We also discuss increasing the ulimit for CouchDB itself in the documentation, both in the Performance section and the Runtime Errors section.
   
   Generally I feel this change is outside the scope of our Makefile to make, since it's altering the shell environment permanently. This kind of setting should be in the user's development environment or CI setup scripting, not in our Makefile.
   
   I'm -0.5 on this PR (meaning I'm against it, but won't block it if someone else feels strongly it should land.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services