iflytek/astron-agent · error · BusinessException
WORKFLOW_ARTIFACT_QUOTA_EXCEEDED
WORKFLOW_ARTIFACT_QUOTA_EXCEEDED
Error message
WORKFLOW_ARTIFACT_QUOTA_EXCEEDED
What it means
Thrown by enforceWorkflowArtifactQuota when uploading a new artifact would push the workflow over its configured active-artifact quota, measured in file count or total active bytes. The service logs activeFiles/activeBytes/incomingBytes and rejects before writing the object.
Solutions
- Delete unneeded artifacts to free quota, then retry the upload
- Upload a smaller file or compress/split the payload
- Raise the workflow artifact quota configuration
- Check for duplicate/retry uploads inflating active counts
Example fix
// before
long incoming = file.getSize(); // exceeds remaining quota
uploadInternal(wfId, flowId, uid, spaceId, file);
// after
if (file.getSize() + activeTotalBytes(wfId) <= quotaBytes(wfId)) {
uploadInternal(wfId, flowId, uid, spaceId, file);
} else {
throw new BusinessException(ResponseEnum.WORKFLOW_ARTIFACT_QUOTA_EXCEEDED);
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean fitsQuota(Long wfId, long bytes) {
return activeTotalBytes(wfId) + bytes <= quotaBytes(wfId)
&& activeFileCount(wfId) + 1 <= quotaFiles(wfId);
} Try / catch
try { uploadInternal(wfId, flowId, uid, spaceId, file); } catch (BusinessException e) {
if (e.getCode() == ResponseEnum.WORKFLOW_ARTIFACT_QUOTA_EXCEEDED) {
promptUserToFreeQuota();
} else throw e;
} Prevention
- Check current usage against quota in the UI before upload
- Clean up unused artifacts regularly
- Avoid retry loops that re-upload identical artifacts
- Keep quotas and usage in a single query to avoid drift
When it happens
Trigger: uploadInternal called when activeFileCount+1 exceeds the file-count quota, or activeTotalBytes+incomingFileBytes exceeds the byte quota for the workflow.
Common situations: Many attachments accumulated on a long-lived workflow; uploading a large file to a nearly-full workflow; quota lowered after artifacts already stored; retry loops re-uploading the same artifacts.
Understand the failure class
Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.
Related errors
- TOO_MANY_BOTS
- errorMessage (dynamic; error.message or fallback 'Failed to…
- FILE_EMPTY
- PARAM_MISS
- S3_UPLOAD_ERROR
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/610639daba1476aa.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowArtifactService.java:457
}
private void enforceWorkflowArtifactQuota(Long workflowId, long incomingFileBytes) {
long activeFileCount = baseMapper.countActiveByWorkflowId(workflowId);
long activeTotalBytes = baseMapper.sumActiveBytesByWorkflowId(workflowId);
long maxFileCount = artifactProperties.getArtifactMaxActiveFilesPerWorkflow();
long maxTotalBytes =
artifactProperties.getArtifactMaxActiveTotalSizePerWorkflow().toBytes();
boolean fileCountExceeded = activeFileCount >= maxFileCount;
boolean totalBytesExceeded = incomingFileBytes > maxTotalBytes
|| activeTotalBytes > maxTotalBytes - incomingFileBytes;
if (fileCountExceeded || totalBytesExceeded) {
log.warn(
"Rejected workflow artifact because its active quota would be exceeded, workflowId={}, activeFiles={}, activeBytes={}, incomingBytes={}",
workflowId,
activeFileCount,
activeTotalBytes,
incomingFileBytes);
throw new BusinessException(ResponseEnum.WORKFLOW_ARTIFACT_QUOTA_EXCEEDED);
}
}
/** Marks every artifact for a deleted workflow so the scheduled object purge can drain it. */
@Transactional
public int tombstoneWorkflowArtifacts(Long workflowId) {
if (workflowId == null) {
throw new BusinessException(ResponseEnum.PARAM_ERROR);
}
return baseMapper.update(
null,
Wrappers.lambdaUpdate(WorkflowArtifact.class)
.eq(WorkflowArtifact::getWorkflowId, workflowId)
.eq(WorkflowArtifact::getDeleted, Boolean.FALSE)
.set(WorkflowArtifact::getDeleted, Boolean.TRUE)
.set(WorkflowArtifact::getUpdateTime, LocalDateTime.now()));
}
View on GitHub (pinned to 5e758547a8)