Varun Anand
Varun Anand

Reputation: 33

MarkLogic "XDMP-FRAGTOOLARGE" error while storing 200MB+ File using REST

When i try to store a 200MB+ xml file to marklogic using REST it gives the following error "XDMP-FRAGTOOLARGE: Fragment of /testdata/upload/submit.xml too large for in-memory storage".

I have tried the Fragment Roots and Fragment Parents option but still gets the same error.

But when i store the file without '.xml' extension in uri. it saves the file but not Xquery operations can be performed on it.

Upvotes: 3

Views: 526

Answers (1)

grtjn
grtjn

Reputation: 20414

MarkLogic won't be able to derive the mime from the uri without extension. It will then fall back to storing it as binary.

I think that if you would use xdmp:document-load from QConsole, you might be able to load it correctly, as that will not try to hold the entire document in memory first. It won't help you much though, you will likely hit the same error elsewhere. The REST api will have to pass it through in memory, so that won't work like this.

You could raise memory settings in the Admin UI, but you are generally better off by splitting your input. MarkLogic Content Pump (MLCP) will allow you to do so using the aggregate_record options. That will split the file into smaller pieces based on a particular element, and store these as separate documents inside MarkLogic.

HTH!

Upvotes: 4

Related Questions