Search code examples
spring-bootcloud-foundryspring-cloud-task

PCF Task/Scheduler Job memory allocation from manifest.yml


I have a task app in the PCF. Whenever I run the task or schedule job.Memory allocation for task/job execution is not the same as for the app. It always allocated memory 512MB (default in my case). But app memory allocated for 2GB. Below is my manifest.yml

applications:
- name: hello-world 
  instances: 0
  memory: 2G  

I can allocate memory for task from the CLI like below. But I don't know about PCF scheduler job :

cf run-task hello-world ".java-buildpack/open_jdk_jre/bin/java org.springframework.boot.loader.JarLauncher" -m 2GB

What about the Production environment where I can't use CLI. Is there any way I can allocate memory for the task and PCF scheduler job from manifest.yml.


Solution

  • The PCF Scheduler does not, at the time I write this, support setting the memory limit for a scheduled task. It will always use the default memory limit set by your platform operations team. This is a popular feature request though and on the roadmap.