首页 > 解决方案 > task-launcher-cloudfoundry 应用程序在多次启动任务后进入磁盘内存不足

问题描述

我每 20 分钟使用一次触发任务启动一个任务 | PCF 中的任务启动器-cloudfoundry。task-launcher-cloudfoundry 通常下载触发任务提供的任务 jar 并保存在临时文件夹中,如

``` 正在下载 [ https://appregister-acp.pre.ptlapps.com/UTVINSummary_Task-1.0.0-SNAPSHOT.jar]到 /home/vcap/tmp/spring-cloud-deployer4679647774227645681/b955e68a620b6feba7e9ebf6970788b16c6fbec0

So every time triggertask send task information based on it interval setting to task-launcher-cloudfoundry then task jar get downloaded to temp location of this app which leads to using up of allocated disk memory completely and leads to errors like 2018-12-20T18:00:16.867-05:00 [APP/PROC/WEB/0] [OUT] org.springframework.messaging.MessageHandlingException:嵌套异常是 reactor.core.Exceptions$ReactiveException:java.nio.file。 FileSystemException:/home/vcap/tmp/spring-cloud-deployer7629046795282951794:磁盘配额超过```,最后任务在几次触发后没有启动[根据triggertask的计划]

流定义: stream create testTrigger10 --definition "triggertask --uri=https://app123s.com/abc.jar --triggertask.application-name='kk_test_518PM' --trigger.fixed-delay=1500 --triggertask.environment-properties='spring.cloud.task.name=Task_temp' | task-launcher-cloudfoundry --maven.remote-repositories.repo1.url=https://repo.spring.io/libs-snapshot --spring.cloud.deployer.cloudfoundry.url=ABC.com --spring.cloud.deployer.cloudfoundry.org=SCDF-acceptance --spring.cloud.deployer.cloudfoundry.space=scdf-acp-space --spring.cloud.deployer.cloudfoundry.taskTimeout=1000" --deploy

task-launcher-cloudfoundry 应用规格:1GB磁盘空间,1GB内存

所以应用程序在 7 次迭代后达到 1GB 磁盘空间。所以即使我将磁盘空间增加到 2GB 也有一次我可能会在来自 tasktrigger 的一些触发器调用后再次面临这个问题。

启动任务后如何清理下载的任务jar?是否有任何参数可用于清理磁盘空间?

注意:task-launcher-cloudfoundry 应用程序未处于崩溃状态。它将处于抛出异常的运行状态。

全栈错误:

https://github.com/spring-cloud/spring-cloud-dataflow/issues/2713

标签: spring-cloud-dataflowspring-cloud-task

解决方案


同样的问题也发布在这里,也作为 GitHub 问题发布。

GitHub 问题中描述了四种不同的选项。有关更多详细信息,请参阅spring-cloud/spring-cloud-dataflow/issues/2713#issuecomment-449986585


推荐阅读