Troubleshooting / MySQL Storage Exceeds Limit
After heavy usage of DataFlux Func for a period of time, you may encounter a situation where MySQL storage space becomes excessively large.
1. Cause
By default, DataFlux saves the execution records of each function task (including all print(...) logs) in MySQL. The retention policy is as follows:
| Function Task Source | Number of Function Task Records Saved |
|---|---|
| Function API | Last 100 tasks for each function API |
| Scheduled Tasks | Last 500 tasks for each scheduled task |
| Connector Subscription Message Processing | Last 1,000 tasks for each connector |
Each function task record is truncated according to the following limits:
| Limit | |
|---|---|
Length of each print(...) log |
3,000 characters |
| Total log length per function task record | 50,000 characters, retaining: First 20,000 characters Last 30,000 characters |
Since the system needs to retain a certain number of recent task records for each task source, configuring a large number of function APIs, scheduled tasks, etc., may occupy a significant amount of MySQL storage space.
2. Solution
Disabling local function task recording can significantly reduce the pressure on MySQL storage space.
You can refer to Deployment and Maintenance / System Metrics and Task Records / Disable Local Function Task Records to disable "Local Function Task Recording" and alleviate MySQL storage pressure.