spring-cloud-dataflow - 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
解决方案
同样的问题也发布在这里,也作为 GitHub 问题发布。
GitHub 问题中描述了四种不同的选项。有关更多详细信息,请参阅spring-cloud/spring-cloud-dataflow/issues/2713#issuecomment-449986585。
推荐阅读
- clojure - Clojure 将字符串变量评估为符号,这种使用读取字符串可以吗?
- reactjs - 在地图函数中呈现父级时将道具传递给子级的最佳方式
- android - 每行带有 layout_constraintHeight_min 的 Flat ConstraintLayout 不起作用
- java - to.Radian 方法导致我的应用程序崩溃.. 我不知道为什么?
- python - UnicodeDecodeError:“utf-8”编解码器无法解码位置 65534-65535 中的字节:数据意外结束
- c++ - 带有键和排序标准的容器分开
- python - Pandas Dataframe:根据正/负值分配给不同的列
- ios - Firebase - 推送通知 - 没有按预期工作
- git - 如何将提交从拉取请求移动到另一个分支?
- maven - 低于异常是Testng,但我的项目中没有显示错误