I’ll provide a complete solution addressing all three focus areas: token timeout configuration, session persistence, and large file handling.
Token Timeout Configuration:
The 20-minute default timeout is insufficient for large CAD file transfers. However, rather than simply increasing the timeout globally (which creates security risks), implement a differentiated timeout strategy. In your agile.properties:
auth.token.timeout.default=1200000
auth.token.timeout.cad=7200000
auth.token.refresh.enabled=true
auth.token.refresh.threshold=300000
This sets CAD-specific tokens to 2 hours while maintaining 20-minute defaults for other operations. The refresh threshold triggers automatic token renewal 5 minutes before expiration.
Session Persistence:
Implement active session maintenance in your CAD connector configuration. Edit the connector’s config.xml to enable keepalive:
<session-config>
<keepalive-enabled>true</keepalive-enabled>
<keepalive-interval>180000</keepalive-interval>
<max-idle-time>3600000</max-idle-time>
</session-config>
The 3-minute keepalive interval ensures the Agile server recognizes the session as active during file transfers. The connector will send lightweight ping requests that don’t interfere with the upload but maintain session validity.
Additionally, implement token refresh logic in your custom CAD integration code:
if (tokenExpiryTime - currentTime < 300000) {
newToken = authService.refreshToken(currentToken);
connector.updateSessionToken(newToken);
}
Large File Handling:
For 500MB+ assemblies, implement chunked upload with progress tracking. This provides three key benefits: prevents timeout issues, enables resume capability, and improves error recovery.
Configure chunked upload in your CAD connector:
cad.upload.chunk.size=52428800
cad.upload.chunk.retry.enabled=true
cad.upload.chunk.retry.attempts=3
This breaks files into 50MB chunks. Each chunk uploads independently with its own retry logic. Between chunks, the connector refreshes the authentication token if needed.
Implementation Steps:
-
Update your Agile authentication properties to enable CAD-specific token timeouts and refresh capabilities.
-
Upgrade your SolidWorks connector to version 9.3.5.4 or later, which includes native token refresh support.
-
Configure session keepalive in the connector’s XML configuration file.
-
Enable chunked uploads for files exceeding 100MB.
-
Implement monitoring to track upload completion rates and token refresh frequency.
Testing Protocol:
Test with progressively larger files: 100MB, 250MB, 500MB, and 1GB assemblies. Monitor the connector logs to verify:
- Token refresh occurs automatically before expiration
- Keepalive requests maintain session throughout transfer
- Chunked uploads complete successfully without interruption
Additional Considerations:
For extremely large assemblies (1GB+), consider implementing server-side assembly optimization. Configure Agile to generate lightweight representations during upload, reducing the amount of data transferred initially. Full geometry can be uploaded asynchronously after the initial check-in completes.
Also enable upload progress tracking in the SolidWorks interface so engineers can monitor transfer status and estimated completion time. This reduces frustration and unnecessary upload restarts.
With these configurations, your large CAD file transfers should complete reliably without authentication failures, even for assemblies exceeding 1GB in size.