Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default for job_memory_max to 0 (instead of current setting of 1 GB) #210

Open
dossy opened this issue Aug 6, 2019 · 12 comments
Open

Comments

@dossy
Copy link

dossy commented Aug 6, 2019

A job execution is terminated with the following error:

"Error: Job Aborted: Exceeded memory limit of 1 GB"

But, the event scheduled has no resource limits set (all checkboxes unchecked). How can I run jobs that require more than 1 GB of memory?

@dossy
Copy link
Author

dossy commented Aug 6, 2019

I just found job_memory_max which appears to be set to 1073741824 by default. Can I set this to 0 to mean "no limit" or will it abort all jobs for exceeding the memory limit of 0? Guess we'll find out ...

@jhuckaby
Copy link
Owner

jhuckaby commented Aug 6, 2019

See this section in the docs:

https://github.com/jhuckaby/Cronicle#job_memory_max

job_memory_max

This parameter allows you to set a default memory usage limit for jobs, specified in bytes. This is measured as the total usage of the job process and any sub-processes spawned or forked by the main process. If the memory limit is exceeded, the job is aborted. The default value is 1073741824 (1 GB). To disable set it to 0.

Memory limits can also be customized in the UI per each category and/or per each event (see Event Resource Limits below). Doing either overrides the master default.

@dossy
Copy link
Author

dossy commented Aug 6, 2019

So, if I set the memory limit to 0 on in the job scheduler and tick the checkbox, does that disable the limit that's set in the config.json?

@jhuckaby
Copy link
Owner

jhuckaby commented Aug 6, 2019

Nope, sorry, the value has to be non-zero to take effect in the UI.

@dossy
Copy link
Author

dossy commented Aug 6, 2019

Okay, so I did the right thing setting job_memory_max to 0 in the config.json, then - thanks.

@dossy
Copy link
Author

dossy commented Aug 6, 2019

Is it worth turning this issue into a request to make the default for job_memory_max be 0 like the other job_* config settings (job_memory_sustain, job_cpu_max, job_cpu_sustain, and job_log_max_size)?

@jhuckaby
Copy link
Owner

jhuckaby commented Aug 6, 2019

Sure, I'd be happy to make that change.

@dossy dossy changed the title Error: Job Aborted: Exceeded memory limit of 1 GB Change default for job_memory_max to 0 (instead of current setting of 1 GB) Aug 6, 2019
@dossy
Copy link
Author

dossy commented Aug 6, 2019

I can totally see how setting a "sane" default for job_memory_max can help people avoid unintentional run-away tasks that are executing, but given that the UI makes it clear you can set per-job limits (which is awesome!) ... it was surprising to me that there was a default limit in place that I could only change/remove by editing the config.

Thanks, @jhuckaby!

@tushar9953
Copy link

Hello

Do we need to make this change in master server only or in worker too?

@jhuckaby
Copy link
Owner

@tushar9953 Master only.

@tushar9953
Copy link

Thanks @jhuckaby :)

@iamumairayub
Copy link

set job_memory_max to 0 in /opt/cronicle/conf/config.json and then restart /opt/cronicle/bin/control.sh restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants