cancel
Showing results for 
Search instead for 
Did you mean: 

Memory limit in jobscheduler instance

Jibbril
Newcomer
0 Kudos
78

Hello Experts, 

I have an instance of the jobscheduler that runs a recurring Task (not job) which handles some data. At its peak, the task uses approximately 1.5gb of memory. When I run this task locally things work fine, but once deployed to the jobscheduler I get errors saying the following:

Aborted 11: 0x560926a19579 [node] 10: 0x560926579de1 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node] 9: 0x56092614cd15 v8::internal:‌‌:NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node] 8: 0x56092616f807 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node] 7: 0x56092616e5ca v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node] 6: 0x560926197eff v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node] 5: 0x5609261863b9 [node] 4: 0x560925f796a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]

I interpret it as an issue with being out of memory, and as such my question is this: How can I scale the available memory in the jobscheduler instance? 

The jobscheduler instance is created as a part of a larger project, where it is requested in a mta.yaml file as below:

modules:
  - name: mymod
    requires:
      - myjobscheduler
    parameters:
      - memory: 1500M
resources:
  - name: myjobscheduler
    type: org.cloudfoundry.existing-service

I have tried scaling the memory parameter of the module itself, but this does not seem to help the memory available in the job scheduler. Any help would be much appreciated. 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Nikoleta
Associate
Associate
0 Kudos

Hello Jibbril,

In the official Cloud Foundry documentation you can find the optional parameters you can provide when you create a CF Task: https://v3-apidocs.cloudfoundry.org/version/3.172.0/index.html#create-a-task

These parameters can be added when you are creating a Schedule for a CF task from the Job Scheduler Dashboard. There is a text area "Options(JSON)" in the "Create Schedule" popup in which you can provide the parameters in JSON format. For example, if you'd like to execute the CF task with 1500 MB allocated memory, you can write in the "Options(JSON)" text:

{"memory_in_mb": 1500}

Job Scheduler instance memory is not related to the memory used to execute CF tasks, it is a matter of Cloud Foundry itself. The Job Scheduling service executes the CF tasks as it sends requests to the CF API and the service can pass JSON data with the optional parameters.

I hope this will help.

Best regards,

Nikoleta