Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1550

Prevent insertion of overlarge documents

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.2.10
    • Component/s: mongoimport

      I accidentally tried to import a 230MB document and got an error which was hard to decipher. The server log did show something more meaningful so even pointing me there would be nice.

      [ernie@eahimac ~]$ mongoimport --verbose --collection=spot /tmp/spot-us-east-1-2016-11-01.txt
      2016-11-17T18:57:45.636-0500    filesize: 243084646 bytes
      2016-11-17T18:57:45.636-0500    using fields:
      2016-11-17T18:57:45.639-0500    connected to: localhost
      2016-11-17T18:57:45.639-0500    ns: test.spot
      2016-11-17T18:57:45.639-0500    connected to node type: standalone
      2016-11-17T18:57:45.639-0500    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-11-17T18:57:45.639-0500    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-11-17T18:57:48.638-0500    [########################] test.spot    232MB/232MB (100.0%)
      2016-11-17T18:57:51.640-0500    [########################] test.spot    232MB/232MB (100.0%)
      2016-11-17T18:57:54.431-0500    error inserting documents: write tcp 127.0.0.1:57202->127.0.0.1:27017: write: broken pipe
      2016-11-17T18:57:54.431-0500    [########################] test.spot    232MB/232MB (100.0%)
      2016-11-17T18:57:54.431-0500    imported 1 document
      [ernie@eahimac ~]$ tail /usr/local/var/log/mongodb/mongo.log
      2016-11-17T18:48:35.113-0500 I NETWORK  [conn2] end connection 127.0.0.1:56881 (0 connections now open)
      2016-11-17T18:48:46.435-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56887 #3 (1 connection now open)
      2016-11-17T18:48:55.529-0500 I NETWORK  [conn3] recv(): message len 170359891 is invalid. Min 16 Max: 48000000
      2016-11-17T18:48:55.529-0500 I NETWORK  [conn3] end connection 127.0.0.1:56887 (0 connections now open)
      2016-11-17T18:49:46.658-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56923 #4 (1 connection now open)
      2016-11-17T18:49:55.492-0500 I NETWORK  [conn4] recv(): message len 170359891 is invalid. Min 16 Max: 48000000
      2016-11-17T18:49:55.492-0500 I NETWORK  [conn4] end connection 127.0.0.1:56923 (0 connections now open)
      2016-11-17T18:57:45.639-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:57202 #5 (1 connection now open)
      2016-11-17T18:57:54.428-0500 I NETWORK  [conn5] recv(): message len 170359891 is invalid. Min 16 Max: 48000000
      2016-11-17T18:57:54.430-0500 I NETWORK  [conn5] end connection 127.0.0.1:57202 (0 connections now open)
      [ernie@eahimac ~]$
      

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            ernie.hershey@mongodb.com Ernie Hershey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: