You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

配置SPRING_CLOUD_DATAFLOW_SERVER_CLOUDFOUNDRY_FREE_DISK_SPACE_PERCENTAGE无效求助

Troubleshooting Disk Cleanup Issues with Spring Cloud Data Flow Server 1.3.0.RELEASE on Cloud Foundry

Hey there, let's work through this frustrating disk space issue you're hitting with your Data Flow Server! I've dealt with similar headaches in older Data Flow versions, so here are some targeted steps to diagnose and fix it:

1. Double-Check Environment Variable Configuration

First off, make sure you've got the variable name exactly right—typos are easier to make than you think! The correct variable is:
SPRING_CLOUD_DATAFLOW_SERVER_CLOUDFOUNDRY_FREE_DISK_SPACE_PERCENTAGE

  • Verify it's set at the application level in your Cloud Foundry space (not just a space-level variable, unless your deployment is configured to pick those up).
  • Check the server startup logs to confirm the variable is being loaded—look for a line like Free disk space percentage threshold: X% (X being your configured value). If you don't see this line, the variable isn't being read correctly.

2. Understand Version Limitations of 1.3.0.RELEASE

Here's a critical detail: In the 1.3.x release line, the built-in disk cleanup mechanism doesn't automatically purge Maven artifacts stored in the ~/.m2/repository directory. The cleanup logic only targets temporary task execution files and logs, not the cached Maven dependencies. That's why your variable setting isn't affecting the disk space used by those artifacts—they're outside the scope of the cleanup job in this version.

3. Workarounds for Your Current Version

Since upgrading might not be an immediate option, try these fixes to reclaim space and prevent future overload:

  • Configure a Custom Maven Repository Path: Set the maven.localRepository property in your Data Flow Server configuration to a directory that falls under the monitored cleanup path. For example, add this environment variable:
    MAVEN_LOCAL_REPOSITORY=/home/vcap/app/maven-repo
    (Note: Test this first, as 1.3.x's cleanup logic may still have limited coverage here.)
  • Add a Periodic Cleanup Script: Deploy a small companion task to Cloud Foundry that runs on a schedule to clean up old artifacts in the ~/.m2/repository directory. A simple script example to delete artifacts older than 7 days:
    find /home/vcap/.m2/repository -type f -mtime +7 -delete
    
    Run this during off-peak hours to avoid interfering with active jobs.
  • Standardize Dependency Versions: If your batch jobs use a lot of unique dependency versions, try consolidating to a smaller set to reduce the number of cached artifacts piling up.

4. Long-Term Fix: Upgrade to a Newer Version

The disk cleanup logic was completely overhauled in later releases (starting around 1.7.x and beyond). Newer versions include automatic cleanup of cached Maven artifacts when the free disk space threshold is hit. Upgrading to a supported version of Spring Cloud Data Flow Server for Cloud Foundry will eliminate the need for manual workarounds and give you more robust disk management out of the box.

内容的提问来源于stack exchange,提问作者fhdev25

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:15:46