Object you're saving is large...plone.restapi?

We are currently using plone.restapi for a migration to Plone 5.1-latest.

Creating a new resource with the data for an image field (size 20 KB) produces this error:

The related image field on the DX site is a NamedBlobImage.

Anyone seen this?

/home/plone/sandboxes/dynamore.buildout.plone5/eggs/ZODB-5.3.0-py2.7.egg/ZODB/Connection.py:581: UserWarning: The <type 'BTrees.IOBTree.IOBucket'>
object you're saving is large. (19694719 bytes.)

Perhaps you're storing media which should be stored in blobs.

Perhaps you're using a non-scalable data structure, such as a
PersistentMapping or PersistentList.

Perhaps you're storing data in objects that aren't persistent at
all. In cases like that, the data is stored in the record of the
containing persistent object.

In any case, storing records this big is probably a bad idea.

If you insist and want to get rid of this warning, use the
large_record_size option of the ZODB.DB constructor (or the
large-record-size option in a configuration file) to specify a larger
size.

  warnings.warn(large_object_message % (obj.__class__, len(p)))

Yeah, I've seen this once or twice before, a few years back I think. The message doesn't really help without an objectid of some sort, unfortunately.
plone.restapi doesn't really do anything except for passing stuff to DX.

I'm guessing this is the catalog somehow; does it contain weird stuff ie binary data?

I am only using the standard field serialisation for images/fields:

http://plonerestapi.readthedocs.io/en/latest/serialization.html#upload-deserialization

to expand on the answer from @jaroel, the message has nothing to do with your object size. The default limit for a standard Plone 5.1 is 16 Mb:

ZODB-5.3.0-py2.7.egg/ZODB/DB.py: large_record_size=1<<24,

and it is exceeded by an object of type BTrees.IOBTree.IOBucket, that is, a ZODB internal, not at all by an Image object.
I am hardly a ZODB expert but what I have always seen is that with B-tree insertions are best managed when the keys are random. If your keys are sorted you can get problems with your tree getting unbalanced and performance suffer. As a wild guess, could it be what is happening there ? Maybe a reindex could help.

There is no large data involved with the particular POST operations. I am creating a resource with some richtext and a 20KB image.

-aj

yes, yes... but when an object is inserted in the Zodb, there is management involved to handle indexing. I actually tried to insert objects into my test Plone instance using plone.restapi, with documents having a useful size not exceeding 20 bytes. The biggest Zodb write was 12K (there were an astonishing number of them), a global write of the catalog for all the objects in the database, even outside of the folder where I was sending the documents (there are not a lot objects in this test Plone instance, but the full 28 objects for the OODBTree - probably brains- where written, that's a bit less than 500 bytes per object)