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

Sharding on GridFS files, all the files ends up on the same shard

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.10
    • Component/s: Sharding
    • None

      Hi !

      We have a collection that contains files (and a lot of them) that have sharding enabled on it on the following indexes:

      fs.chunks :

      {file_id : 1, n: 1}

      The files in it are ~15.27mb and when I run fs.chunks.getShardDistribution() I'm getting :

      Shard shard0000 at server1:27018
      data : 11.84GiB docs : 48997 chunks : 97634
      estimated data per chunk : 127KiB
      estimated docs per chunk : 0

      Shard shard0001 at server2:27018
      data : 12.51GiB docs : 51791 chunks : 97633
      estimated data per chunk : 134KiB
      estimated docs per chunk : 0

      Shard shard0002 at server3:27018
      data : 5647.85GiB docs : 23407469 chunks : 97633
      estimated data per chunk : 59.23MiB
      estimated docs per chunk : 239

      Totals
      data : 5672.22GiB docs : 23508257 chunks : 292900
      Shard shard0000 contains 0.2% data, 0.2% docs in cluster, avg obj size on shard : 253KiB
      Shard shard0001 contains 0.22% data, 0.22% docs in cluster, avg obj size on shard : 253KiB
      Shard shard0002 contains 99.57% data, 99.57% docs in cluster, avg obj size on shard : 253KiB

      We're starting to run out of space on the server that is hosting shad0002 and can't figure out why the shard aren't balancing out :S

      In the log we're seeing error like :
      2017-02-21T18:50:39.563+0000 W SHARDING [conn1338] could not autosplit collection telemetry-fs.fs.chunks :: caused by :: 13333 can't split a chunk in that many parts

      and googling it doesn't give me lot of information

      Is there anything we're missing there ?

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            smarquis Stephane Marquis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: