Here’s a comprehensive solution addressing all three constraint areas:
1. Bulk Upload Endpoint Limits
The BulkImport endpoint in Windchill 11.2 has undocumented but real limits. PTC’s internal recommendation is 100 records per synchronous API call. Beyond that, you encounter:
- Transaction timeout limits (180s default in wt.properties)
- Memory allocation issues for large result sets
- Database lock contention
The proper approach is implementing client-side batching:
// Pseudocode - Key implementation steps:
1. Read CSV file and split into chunks of 100 records each
2. For each chunk, create separate multipart request
3. POST to /SupplierMgmt/BulkImport with chunk data
4. Collect response IDs and track success/failure per chunk
5. Implement retry logic for failed chunks with exponential backoff
// See documentation: Windchill REST API Guide Section 8.4
This keeps each transaction under 30-45 seconds and prevents resource exhaustion.
2. API Gateway Timeout Settings
Your 60-second timeout is at the HTTP server level (Apache/IIS), not Windchill. While you can increase it, that’s treating symptoms not root cause. Proper configuration:
- HTTP Server: Increase timeout to 120s as safety buffer for legitimate operations
- Method Server: Verify wt.method.server.requestTimeout=180000 (180s) in wt.properties
- Database: Check connection timeout settings in wt.properties: wt.pom.dbcp.maxWait=120000
However, even with generous timeouts, processing 500 suppliers synchronously is architecturally wrong. You need asynchronous processing:
Asynchronous Pattern (Recommended):
// Pseudocode - Key implementation steps:
1. Create custom REST endpoint that accepts full CSV file
2. Store file temporarily and return job ID immediately (< 2s response)
3. Queue background task using Windchill QueueManager
4. Process CSV in background with 100-record batch commits
5. Provide status endpoint: GET /SupplierMgmt/BulkJobs/{jobId}
// See documentation: Windchill Customization Guide Chapter 12
This pattern decouples upload from processing, preventing all timeout issues.
3. Server-Side Processing Constraints
The 95% CPU spike indicates inefficient processing. The OOTB bulk endpoint creates each supplier individually within a single transaction, causing:
- Linear performance degradation (each record takes longer than previous)
- Database table locks held for entire transaction duration
- Memory accumulation for validation results
Optimization strategies:
- Enable batch SQL inserts: Set wt.pom.dbcp.defaultBatchSize=50 in wt.properties
- Increase method server heap if consistently processing large batches: -Xmx8g minimum
- Disable unnecessary event listeners during bulk operations (if you have custom listeners on supplier creation)
- Use database connection pooling: wt.pom.dbcp.maxActive=100
Practical Implementation for Your Use Case:
For 500-1000 supplier onboarding:
-
Client-side chunking (immediate solution):
- Split CSV into 100-record chunks
- Submit sequentially with 2-second delays between batches
- Track failures and retry
- Total time: ~8-10 minutes for 1000 suppliers (acceptable for batch onboarding)
-
Server-side async processing (better long-term):
- Develop custom REST endpoint using Windchill QueueManager
- Accept full CSV, process asynchronously
- Provide job status polling endpoint
- Send email notification on completion
Testing recommendations:
- Monitor method server metrics during bulk operations: CPU, memory, DB connections
- Check MethodServer.log for transaction timeout warnings
- Verify no deadlocks in database during parallel processing
- Load test with concurrent bulk operations to ensure stability
The 100-record batch size isn’t arbitrary - it’s based on typical supplier attribute complexity and database transaction overhead. If your supplier records are minimal (few attributes), you might push to 150 per batch, but 200+ will always risk timeouts regardless of configuration tuning.
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.