Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13825

Close connections for which no thread can be allocated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.13
    • Component/s: Internal Code
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Platform 6 07/17/15, Platforms 2017-08-21, Platforms 2017-09-11

      Description

      Under some circustances, if too many connections are open, pthread_create() call in mongosMain might fail with EAGAIN.
      mongos doesn't properly handle boost::thread_resource_error exception and terminates. Maybe it could just refuse the connection and keep running.

      Trace example:

      2014-05-01T13:17:57.114-0700 [mongosMain] pthread_create failed: errno:11 Resource temporarily unavailable
      2014-05-01T13:17:57.114-0700 [mongosMain] can't create new thread, closing connection
      2014-05-01T13:17:57.116-0700 [conn973] DBClientCursor::init call() failed
      2014-05-01T13:17:57.116-0700 [mongosMain] connection accepted from 127.0.0.1:43764 #980 (167 connections now open)
      2014-05-01T13:17:57.116-0700 [mongosMain] pthread_create failed: errno:11 Resource temporarily unavailable
      2014-05-01T13:17:57.116-0700 [mongosMain] can't create new thread, closing connection
      2014-05-01T13:17:57.118-0700 [conn861] DBClientCursor::init call() failed
      2014-05-01T13:17:57.120-0700 [conn927] DBClientCursor::init call() failed
      2014-05-01T13:17:57.127-0700 [conn976] ERROR: Uncaught std::exception: boost::thread_resource_error, terminating
      2014-05-01T13:17:57.127-0700 [conn976] dbexit: rc:100
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              acm Andrew Morrow
              Reporter:
              davide.italiano Davide Italiano
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: