Bulk import of simulation data via REST API fails due to file size exceeded error

We’re trying to automate simulation result uploads to Windchill 12.0 CPS05 using the REST API, but large files (>100MB) consistently fail with ‘file size exceeded’ error. Our simulation outputs are typically 150-250MB FEA result files that need to be attached to WTPart objects.

Current API approach:


POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:456')/Attachments
Content-Type: multipart/form-data
File: simulation_results.fea (187MB)

Error response: “Maximum file size limit exceeded. Allowed: 104857600 bytes”

We’ve checked the wt.content.maxFileSize property and Tomcat’s maxPostSize configuration, but neither seems to affect the REST API upload limit. The UI allows these file uploads without issue. Is there a separate API-specific file size configuration we’re missing?

Your issue requires a comprehensive configuration update across three layers. Let me walk through the complete solution addressing all focus areas.

1. REST API file upload limits: The 100MB limit you’re hitting is the default OData servlet restriction. This is independent of the UI upload limits. Modify Windchill/codebase/WEB-INF/web.xml:

<servlet>
  <servlet-name>ODataServlet</servlet-name>
  <init-param>
    <param-name>maxFileSize</param-name>
    <param-value>524288000</param-value> <!-- 500MB -->
  </init-param>
</servlet>

Also update the multipart configuration:

<multipart-config>
  <max-file-size>524288000</max-file-size>
  <max-request-size>524288000</max-request-size>
</multipart-config>

2. wt.content.maxFileSize property: This controls Windchill’s content storage layer. Update in site.xconf or via the property management UI:


wt.content.maxFileSize=524288000

Important: This property is in bytes. Set it to at least match your largest expected file size. After changing, run xconfmanager -p to propagate the change.

3. Tomcat server configuration: Edit Windchill/Tomcat/conf/server.xml and update the Connector element:

<Connector port="8080" protocol="HTTP/1.1"
  maxPostSize="524288000"
  connectionTimeout="300000"
  maxSwallowSize="524288000"/>

The connectionTimeout increase (5 minutes) is critical for large file uploads over slower networks. The maxSwallowSize prevents Tomcat from rejecting the request body.

Additional critical configuration: Update the Apache Commons FileUpload settings in Windchill/codebase/service.properties:


com.ptc.windchill.upload.maxFileSize=524288000
com.ptc.windchill.upload.maxRequestSize=524288000
com.ptc.windchill.upload.fileSizeThreshold=10485760

Restart sequence (order matters):

  1. Stop Windchill method server
  2. Stop Tomcat
  3. Clear Tomcat work directory: `rm -rf Windchill/Tomcat/work/*
  4. Start Tomcat
  5. Start method server
  6. Verify with: `xconfmanager -s wt.content.maxFileSize Performance optimization: For files over 200MB, implement chunked uploads:

// Split file into 50MB chunks
POST /Windchill/servlet/odata/ProdMgmt/ChunkedUpload/Initialize
Payload: {"fileName": "simulation_results.fea", "totalSize": 196608000}

// Upload each chunk
POST /Windchill/servlet/odata/ProdMgmt/ChunkedUpload/Chunk
Payload: {"uploadId": "session_id", "chunkIndex": 0, "data": "base64_chunk"}

// Finalize
POST /Windchill/servlet/odata/ProdMgmt/ChunkedUpload/Complete
Payload: {"uploadId": "session_id", "attachTo": "OR:456"}

This approach provides better error recovery and progress tracking for large simulation files. Test with a 150MB file first to validate the configuration before scaling up to your full 250MB files.


This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

The REST API has its own upload size limits separate from the UI. Check the servlet configuration in web.xml for the OData servlet. There should be a max-file-size parameter that defaults to 100MB. You’ll need to modify that and restart Tomcat.

Also verify your Tomcat connector configuration in server.xml. The maxPostSize attribute on the Connector element limits the total request size, including file uploads. If it’s set to default (-1 for unlimited) or a value lower than your file size, that could be the issue. Set it to something like 524288000 (500MB) and restart Tomcat to test.

We dealt with this for CAD file uploads. The issue is that there are actually three different size limits at play: wt.content.maxFileSize (Windchill property), maxPostSize (Tomcat connector), and maxFileSize in the OData servlet configuration. All three need to be aligned. But here’s the catch - even after setting all three, you might hit a fourth limit in the Apache HTTP client that the REST API uses internally. Check if there’s a client-side timeout or buffer limit in your HTTP library.

For files that large, consider using chunked upload instead of a single POST. The REST API supports multipart chunked uploads where you split the file into smaller segments (e.g., 50MB each) and upload them sequentially. This avoids hitting size limits and provides better error recovery if a chunk fails.

Don’t forget about the JVM heap settings. If your Windchill method server doesn’t have enough heap memory allocated, large file uploads can fail even if all the size limits are configured correctly. The API needs to buffer the entire file in memory during processing. Check your method server’s -Xmx setting and consider increasing it if you’re regularly uploading files over 100MB.