Context
You may encounter errors when LangSmith attempts to upload trace data, particularly with larger payloads. These errors typically manifest as "Failed to send compressed multipart ingest" warnings with various HTTP status codes (403, 413, 422, 500) and can prevent traces from appearing in your LangSmith dashboard.
Answer
The multipart ingest errors can occur for several reasons depending on your setup and the specific error code. Here are the most common causes and solutions:
For 403 Forbidden Errors
This typically indicates an authentication issue:
Verify your API key is valid and hasn't expired
Regenerate your API key in the LangSmith dashboard
Update your application configuration with the new API key
Ensure the API key has the correct workspace permissions
The LANGSMITH_WORKSPACE_ID environment variable is not required when using Personal Access Tokens (PATs). If your environment variable points to the wrong workspace, this can lead to 403 errors.
For 413 Payload Too Large Errors
This occurs when your trace data exceeds size limits:
For self-hosted deployments, increase the
frontend.maxBodySizeparameter in your Helm values (default is 25MB)Check if you have nginx ingress controllers with restrictive body size limits
Consider reducing the amount of data being traced or using attachments instead of including large files in state
For 422 Unprocessable Entity Errors
These errors often indicate data corruption or configuration issues:
Set
LANGSMITH_DISABLE_RUN_COMPRESSION="true"to disable compression and help isolate the issueReduce batch size by setting
LANGSMITH_BATCH_SIZE_LIMITto a smaller value (try 5MB: 5,242,880 bytes)For self-hosted deployments, ensure blob storage is properly configured if enabled
Check that platform-backend pods have write access to temporary directories
For Self-Hosted Deployments
Additional considerations for self-hosted LangSmith instances:
Ensure blob storage (S3/Azure) is properly configured with correct credentials
Verify platform-backend pods have sufficient resources and aren't memory constrained
Check that the platform-backend service can write to
/tmpdirectoriesConsider increasing the number of platform-backend replicas for high-throughput workloads
For Large State Management
If you're working with large data in LangGraph state:
Use LangSmith attachments for large files instead of including them in state
Implement selective field masking using
Client(hide_inputs=..., hide_outputs=...)Remove large fields from state after they're no longer needed in your workflow
General Troubleshooting
Ensure you're using the latest LangSmith SDK version
Set
LANGCHAIN_CALLBACKS_BACKGROUND=falseto prevent premature termination of uploadsCheck your network connectivity and any proxy configurations that might interfere with uploads
If these steps don't resolve the issue, check your LangSmith backend logs for more specific error details, particularly in the platform-backend pods for self-hosted deployments.