Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6783

increase number of file descriptors allowed for couchbase server ( couchbase user ) for Mac installation

    Details

      Description

      so that it is similar to Linux ( what we do here)
      `ulimit -n` -lt 10240
      https://github.com/couchbase/ns_server/blob/master/couchbase-server.sh.in

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        this explains why in linux we need sudo access when starting up the server but not on mac

        Show
        farshid Farshid Ghods (Inactive) added a comment - this explains why in linux we need sudo access when starting up the server but not on mac
        Hide
        jens Jens Alfke added a comment -

        On OS X this is done with the setrlimit syscall, setting RLIMIT_NOFILE (which defaults to 256). The man page says:

        Only the super-user may raise the maximum limits. Other users may only
        alter rlim_cur within the range from 0 to rlim_max or (irreversibly)
        lower rlim_max.

        Because this information is stored in the per-process information, this
        system call must be executed directly by the shell if it is to affect all
        future processes created by the shell; limit is thus a built-in command
        to csh(1) and ulimit is the sh(1) equivalent.

        This implies we need a privileged helper process that will raise the limit and then launch the server.

        Show
        jens Jens Alfke added a comment - On OS X this is done with the setrlimit syscall, setting RLIMIT_NOFILE (which defaults to 256). The man page says: Only the super-user may raise the maximum limits. Other users may only alter rlim_cur within the range from 0 to rlim_max or (irreversibly) lower rlim_max. Because this information is stored in the per-process information, this system call must be executed directly by the shell if it is to affect all future processes created by the shell; limit is thus a built-in command to csh(1) and ulimit is the sh(1) equivalent. This implies we need a privileged helper process that will raise the limit and then launch the server.
        Hide
        jens Jens Alfke added a comment -

        There is no hard upper limit on RLIMIT_NOFILE, so a process can raise it to whatever it wants without needing root privileges. Sounds like the Mac shell app just needs to call setrlimit to bump this, before it launches the server.

        Show
        jens Jens Alfke added a comment - There is no hard upper limit on RLIMIT_NOFILE, so a process can raise it to whatever it wants without needing root privileges. Sounds like the Mac shell app just needs to call setrlimit to bump this, before it launches the server.
        Hide
        jens Jens Alfke added a comment -
        Show
        jens Jens Alfke added a comment - Out for review: http://review.couchbase.org/#/c/21233/
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        adding this to the release notes. because 2.0 beta testers will notice that starting couchbase server now will require sudo-like privilege .
        i wonder whether a non-admin user on mac can still run the app

        Show
        farshid Farshid Ghods (Inactive) added a comment - adding this to the release notes. because 2.0 beta testers will notice that starting couchbase server now will require sudo-like privilege . i wonder whether a non-admin user on mac can still run the app
        Hide
        jens Jens Alfke added a comment -

        It doesn't require privileges. See my above comment. There is no change in the user experience or requirements.

        Show
        jens Jens Alfke added a comment - It doesn't require privileges. See my above comment. There is no change in the user experience or requirements.
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        sorry missed the last comment. ( only read the first comment )

        in that case this does not have to be documented.

        Show
        farshid Farshid Ghods (Inactive) added a comment - sorry missed the last comment. ( only read the first comment ) in that case this does not have to be documented.
        Hide
        abhinav Abhinav Dangeti added a comment - - edited

        Viewtests results on mac (Lion) for:

        viewtests.ViewBasicTests.test_view_on_x_docs
        viewtests.ViewBasicTests.test_delete_x_docs
        viewtests.ViewBasicTests.test_readd_x_docs
        viewtests.ViewBasicTests.test_update_x_docs
        viewtests.ViewBasicTests.test_invalid_view
        viewtests.ViewBasicTests.test_create_multiple_development_view
        viewtests.ViewBasicTests.test_view_on_x_docs_y_design_docs
        viewtests.ViewBasicTests.test_update_multiple_development_view
        viewtests.ViewBasicTests.test_create_view
        viewtests.ViewBasicTests.test_get_view_during_x_min_load_y_working_set
        viewtests.ViewBasicTests.test_count_sum_x_docs
        viewtests.ViewBasicTests.test_count_reduce_x_docs
        viewtests.ViewBasicTests.test_load_data_get_view_x_mins_y_design_docs
        viewtests.ViewCreationDeletionTests.test_view_multiple_buckets
        viewtests.ViewPerformanceTests.test_latency

        summary so far suite viewtests.ViewBasicTests , pass 13 , fail 0
        summary so far suite viewtests.ViewCreationDeletionTests , pass 1 , fail 0
        summary so far suite viewtests.ViewPerformanceTests , pass 1 , fail 0

        But errors seen while trying to query spatial views, and in getting results from spatial views.

        Show
        abhinav Abhinav Dangeti added a comment - - edited Viewtests results on mac (Lion) for: viewtests.ViewBasicTests.test_view_on_x_docs viewtests.ViewBasicTests.test_delete_x_docs viewtests.ViewBasicTests.test_readd_x_docs viewtests.ViewBasicTests.test_update_x_docs viewtests.ViewBasicTests.test_invalid_view viewtests.ViewBasicTests.test_create_multiple_development_view viewtests.ViewBasicTests.test_view_on_x_docs_y_design_docs viewtests.ViewBasicTests.test_update_multiple_development_view viewtests.ViewBasicTests.test_create_view viewtests.ViewBasicTests.test_get_view_during_x_min_load_y_working_set viewtests.ViewBasicTests.test_count_sum_x_docs viewtests.ViewBasicTests.test_count_reduce_x_docs viewtests.ViewBasicTests.test_load_data_get_view_x_mins_y_design_docs viewtests.ViewCreationDeletionTests.test_view_multiple_buckets viewtests.ViewPerformanceTests.test_latency summary so far suite viewtests.ViewBasicTests , pass 13 , fail 0 summary so far suite viewtests.ViewCreationDeletionTests , pass 1 , fail 0 summary so far suite viewtests.ViewPerformanceTests , pass 1 , fail 0 But errors seen while trying to query spatial views, and in getting results from spatial views.

          People

          • Assignee:
            jens Jens Alfke
            Reporter:
            farshid Farshid Ghods (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes