Quality management data migration fails to import attachments over 10MB, resulting in missing supporting documents

We’re migrating quality records (NCRs, CARs, audit reports) from our old QMS to Agile PLM 9.3.5. The migration script successfully imports all record data, but attachments larger than 10MB fail to upload. These are primarily compliance documents - audit reports, test certificates, and validation protocols that we’re legally required to maintain.

The SDK throws this error for large files:


com.agile.api.APIException: File size exceeds limit
at FileManager.uploadFile(FileManager.java:234)
Attachment: QA-2024-0156_Audit_Report.pdf (15.2 MB) - FAILED

Our attachment size configuration in Admin settings shows a 50MB limit, so I’m confused why 10MB+ files are being rejected. We have about 200 quality records with attachments in the 10-25MB range. Has anyone successfully handled large attachment uploads during data migration? The missing documents are creating audit compliance gaps.

We encountered this exact issue last quarter. The problem is multifaceted - it’s not just the Agile configuration. You need to check: 1) Agile file size limit in Admin settings, 2) Application server (WebLogic) upload size parameter, 3) Web server (Apache/IIS) request size limit, and 4) Database LOB size configuration. Any one of these can block large uploads. For our migration, we ended up implementing chunked uploads through the SDK, breaking files into 5MB segments.

Thanks. I checked the Agile Admin settings - it’s definitely set to 50MB. How do I verify the application server settings? We’re running on WebLogic 12c.

In WebLogic console, go to Servers > [your_server] > Protocols > HTTP. Look for ‘Max Post Size’ parameter - default is often 10MB. Set it to match your Agile configuration (50MB or higher). You’ll need to restart the managed server after changing this. Also check the ‘Post Timeout’ setting to ensure large uploads don’t time out mid-transfer.

The 10MB limit is likely coming from your application server configuration, not Agile. Check your weblogic/tomcat upload size limits. Also, the SDK uploadFile method loads the entire file into memory, which can cause issues with large files even if the size limit is configured correctly.

Let me provide you with a comprehensive solution that addresses all three key areas:

1. Attachment Size Configuration (Multiple Layers)

Your 10MB failure indicates a configuration mismatch across the stack. Here’s what to check and fix:

Agile PLM Layer:

  • Admin > Settings > System Settings > File Manager
  • Set ‘Maximum Attachment Size’ to 52428800 (50MB in bytes)
  • Restart Agile application server after change

WebLogic Layer:

  • Login to WebLogic Console
  • Navigate to: Environment > Servers > [AgileServer] > Protocols > HTTP
  • Set ‘Max Post Size’ to 52428800 bytes (50MB)
  • Set ‘Post Timeout’ to 600 seconds (10 minutes for large uploads)
  • Navigate to: Deployments > agile > Configuration > Web App
  • Add/modify web.xml parameter:
<multipart-config>
  <max-file-size>52428800</max-file-size>
  <max-request-size>52428800</max-request-size>
</multipart-config>

Database Layer (Oracle): Verify LOB storage can handle large files:

SELECT tablespace_name, max_size
FROM dba_tablespaces
WHERE tablespace_name = 'AGILE_DATA';

2. SDK-Based Chunked Upload Implementation

The standard SDK uploadFile() method is problematic for large files because it loads everything into memory. Implement chunked upload instead:

// Chunked upload for large attachments
public void uploadLargeAttachment(IQualityRecord record, File file) {
    int chunkSize = 5242880; // 5MB chunks
    IAttachment att = record.addAttachment();
    att.setChunkedUpload(true);
    // Process file in chunks with progress tracking
}

Key implementation points:

  • Break files into 5MB chunks maximum
  • Use IAttachment.setChunkedUpload(true) method
  • Implement retry logic for failed chunks
  • Track upload progress for audit purposes
  • Validate file integrity after complete upload using checksum

Detailed Migration Script Pattern:

public class QualityAttachmentMigrator {
    private static final int CHUNK_SIZE = 5 * 1024 * 1024; // 5MB

    public void migrateAttachment(IQualityRecord record,
                                   File sourceFile,
                                   Map<String, String> metadata) {
        try {
            if (sourceFile.length() > 10 * 1024 * 1024) {
                // Use chunked upload for files > 10MB
                uploadInChunks(record, sourceFile, metadata);
            } else {
                // Standard upload for smaller files
                standardUpload(record, sourceFile, metadata);
            }

            // Verify upload and log for compliance
            logComplianceRecord(record, sourceFile, metadata);

        } catch (APIException e) {
            handleUploadFailure(record, sourceFile, e);
        }
    }
}

3. Compliance Documentation Requirements

For quality records, you need to maintain complete audit trail:

Document Metadata Preservation:

  • Original creation date and author
  • Approval status and approval chain
  • Document version history
  • File checksum (MD5 or SHA-256) for integrity verification

Migration Audit Log: Create a detailed log for each attachment:


Record ID | Original File | Size | Upload Date | Checksum | Status | Validator
NCR-2024-156 | Audit_Report.pdf | 15.2MB | 2025-05-22 | a3f5... | SUCCESS | jennifer_q

Implementation Steps:

  1. Pre-Migration Setup (Do this first):

    • Update WebLogic Max Post Size to 50MB
    • Verify Agile file size setting is 50MB
    • Test with a single large file before bulk migration
    • Restart all services after configuration changes
  2. Update Migration Script:

    • Implement chunked upload for files > 10MB
    • Add file integrity verification (checksum comparison)
    • Include metadata preservation logic
    • Add detailed error logging with retry capability
  3. Compliance Validation:

    • Generate migration report with all attachment details
    • Include before/after checksums to prove file integrity
    • Document any failed uploads with root cause
    • Create attestation that all required documents migrated successfully
  4. Post-Migration Verification:

    • Random sample 10% of large attachments
    • Verify file opens correctly and matches original
    • Confirm metadata (dates, authors) preserved
    • Run compliance report showing 100% document migration

Specific Fix for Your 200 Records:

Since you have 200 quality records with 10-25MB attachments:

  • First, apply the WebLogic configuration change (highest priority)
  • Restart WebLogic managed server
  • Re-run your migration script for the 200 failed records
  • If you still see failures, implement the chunked upload approach
  • For immediate compliance needs, you can temporarily upload large files manually through the Agile UI while you fix the SDK script

The chunked upload approach is more robust long-term and handles network interruptions better. It’s worth implementing even after fixing the configuration, especially for future migrations or integrations that need to handle large compliance documents.

From a compliance perspective, make sure you’re maintaining the document metadata during migration - creation date, author, approval status. For our FDA-regulated environment, we had to prove document chain of custody during migration. We created an audit log that tracked each attachment upload with checksums to verify file integrity. Just updating the app server settings might fix the technical issue, but don’t forget the compliance documentation requirements.