Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3472

4.0.0.alpha1 timeout issues with sidekiq

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I am seeing a ton of jobs failing when running Sidekiq that are all related to connectivity issues with my Mongo database. I'm stress testing the machine with lots of load, so I queued over 18,000 jobs each with a 5 second retry upon failure. Some of the jobs (I'm guessing the ones with a worker that was able to successfully retrieve a connection thread) worked out just fine. Then I have a ton of others with errors like this, here's a gist: https://gist.github.com/stevef/8138907

      There's also timeout errors coming from Moped that look like the following: Timeout::Error: Waited 0.5 sec

      Note, I'm running Rails 4 with Mongoid code checked out from the master branch in https://github.com/mongoid/mongoid. From what I read, previous versions of Mongoid required explicit closing of connections when a Sidekiq job was done processing. Mongoid 4 is supposed to do that automatically. I can't confirm if it's doing it or not. It seems the problem is two fold when jobs get queued too fast connections aren't available or are timing out. Some workers are successful in opening a connection. Some jobs have to wait until a retry to parse.

      Here's a gist of the stracktrace: https://gist.github.com/stevef/220aeea641f2e1704c89

            Assignee:
            durran Durran Jordan
            Reporter:
            stevef stevef
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: