GoodMemGoodMem
Reference

OOXML Processing Limits

Configure process-wide resource limits for DOCX, PPTX, and XLSX processing.

OOXML Processing Limits

GoodMem applies bounded resource policies while extracting text from DOCX, PPTX, and XLSX files and while rendering XLSX worksheets as page images. Deployment operators can replace individual limits at server startup with one versioned JSON value.

This is a process-wide safety policy. It cannot be changed through an ingestion request or an administrative API, and changes take effect only after the server restarts.

Counters are fresh for each library operation. When GoodMem both extracts text and renders page images for one document, each pass receives the same configured ceilings; the two passes do not share one partially consumed budget.

Configuration Precedence

OOXML limits follow GoodMem's standard server configuration precedence:

  1. --ooxml-limits-json command-line option
  2. GOODMEM_OOXML_LIMITS_JSON environment variable
  3. Compiled GoodMem defaults

A blank environment value is treated as unset. A blank command-line value is rejected. The JSON must contain "version": 1; every other field is optional and inherits its compiled default when omitted.

For an installer-managed deployment, put the JSON on one line in the installation profile's .env file, then run goodmem system stop followed by goodmem system start for that profile:

GOODMEM_OOXML_LIMITS_JSON={"version":1,"extraction":{"outputCharacters":33554432}}

goodmem system upgrade adds this setting to older installer-managed profiles. If it warns that your custom Compose configuration needs manual changes, make sure the environment variable is passed through to the server container.

The equivalent direct server invocation is:

java -jar goodmem-server.jar \
  --ooxml-limits-json='{"version":1,"extraction":{"outputCharacters":33554432}}'

For a multi-instance deployment, apply the identical resolved policy to every instance and use a rolling restart. During the rollout, instances that have not restarted still enforce the previous policy, so ingestion behavior can differ temporarily. Compare the startup log fingerprint across instances to confirm that they resolved the same policy.

Version 1 Fields and Defaults

All numeric values must be positive integers. Zero never means unlimited.

Text Extraction

FieldDefaultMeaning
packageEntries10,000Unique OOXML archive entries admitted
zipEntryVisits100,000ZIP entry headers visited by instrumented passes
inflatedBytes268,435,456Uncompressed bytes read by instrumented package streams
materializedBytes268,435,456Bytes copied into bounded or retained package buffers
worksheetVisits2,048XLSX worksheet occurrences visited
xmlEvents20,000,000Events consumed at instrumented XML parser sites
structuralWorkSteps20,000,000Instrumented layout and structural traversal work
structuralNestingDepth64Maximum instrumented XML hierarchy depth
rowVisits2,000,000XLSX rows visited during text extraction
cellSlotVisits10,000,000XLSX addressable cell slots visited
semanticEvents500,000XLSX controls, comments, and similar structured events
outputCharacters16,777,216UTF-16 units retained in final extraction output
textWorkCharacters268,435,456UTF-16 units copied, allocated, or scanned by instrumented helpers
nestedPayloads256Nonempty embedded payload occurrences entered
nestingDepth6Embedded traversal depth, with the outer package at depth zero

textWorkCharacters counts text processed across multiple passes, so it can exceed the final output size. It must be at least outputCharacters. Its exact count can change between versions.

These limits measure processing work and output size; they do not cap total RAM or temporary disk use. Large values and complex layouts can still use substantial memory. See document-ingestion scratch storage for disk capacity and configuration.

XLSX Page-Image Rendering

FieldDefaultMeaning
maxWidthPixels7,680Maximum width of one worksheet image
maxHeightPixels4,320Maximum height of one worksheet image
maxPixelsPerImage33,177,600Maximum pixels in one worksheet image
maxVisibleCellSlotsPerSheet100,000Row/column slots visited while building one sheet scene
maxSceneElementsPerSheet500,000Drawing elements retained for one sheet scene
maxImagesPerWorkbook20Worksheet images emitted from one workbook
maxTotalPixelsPerWorkbook663,552,000Aggregate output pixels across one workbook

GoodMem produces one page image per worksheet. A worksheet that exceeds the per-image raster bounds is rendered as a bounded top-left preview. Pictures and charts that cross the preview edge are clipped at their authored scale rather than squeezed into the image.

The current page-image API does not expose whether an XLSX image covers the full worksheet or a bounded preview. Consumers should therefore treat large XLSX page images as previews, even when their metadata looks like an ordinary worksheet image.

Workbook-level limits are hard ceilings. If a workbook exceeds the image-count or aggregate-pixel limit, XLSX page-image processing fails and GoodMem stores no partial set of worksheet images. Text extraction and the rest of memory ingestion are tracked separately and can still complete. A sheet can also fail page-image processing if it exceeds a scene-work ceiling.

XLSX workbook rendering concurrency remains fixed at one and is not configurable through this policy. The width, height, per-image pixel, image-count, and workbook-pixel settings are independent ceilings. It is valid for one stricter setting to make another ceiling unreachable.

Complete Example

{
  "version": 1,
  "extraction": {
    "packageEntries": 10000,
    "zipEntryVisits": 100000,
    "inflatedBytes": 268435456,
    "materializedBytes": 268435456,
    "worksheetVisits": 2048,
    "xmlEvents": 20000000,
    "structuralWorkSteps": 20000000,
    "structuralNestingDepth": 64,
    "rowVisits": 2000000,
    "cellSlotVisits": 10000000,
    "semanticEvents": 500000,
    "outputCharacters": 16777216,
    "textWorkCharacters": 268435456,
    "nestedPayloads": 256,
    "nestingDepth": 6
  },
  "xlsxRendering": {
    "maxWidthPixels": 7680,
    "maxHeightPixels": 4320,
    "maxPixelsPerImage": 33177600,
    "maxVisibleCellSlotsPerSheet": 100000,
    "maxSceneElementsPerSheet": 500000,
    "maxImagesPerWorkbook": 20,
    "maxTotalPixelsPerWorkbook": 663552000
  }
}

GoodMem rejects malformed JSON, duplicate or unknown fields, unsupported versions, non-integral values, numeric overflow, and invalid cross-field combinations before connecting to the database. To roll back an override, remove the command-line option or blank/remove the environment value and restart the server.

On this page