Error · SLURM · 5 min read
"Batch job submission failed: Requested time limit is invalid (missing or exceeds some limit)"
sbatch: error: Batch job submission failed: Requested time limit is invalid (missing or exceeds some limit)That is what sbatch printed on a SLURM 25.11.8 test cluster for a job asking for --time=48:00:00 on a partition with a 24-hour limit. Nothing is queued and there is no job id. The wording is in SLURM's source code.
Checked against the docs · SLURM 26.05 and real output from SLURM 25.11.8 · Last checked 12 November 2026 · Spot a mistake? Tell us
Short answer
SLURM refused the job because its walltime (--time) is longer than the partition allows, or because the job gave none where the partition has no default. Look up the partition's limit with sinfo -o "%P %l %L", then submit with a --time within it, or on a partition with a longer limit.
What does this error mean?
Every SLURM job has a time limit, the walltime: how long it may run, set with --time (-t). Each partition has a maximum (MaxTime in slurm.conf) and usually a default (DefaultTime) for jobs that give none. The error says the job's time limit broke one of these rules when it was submitted.
Whether you see this error at all depends on one cluster setting, EnforcePartLimits:
- Set to
ALL: theslurm.confpage says jobs that exceed a partition's limits "will be rejected at submission time", andMaxTimeis one of those limits. You get the line above. (ANYaccepts a job that fits at least one of the partitions it names, so a job sent to one partition is treated the same way.) - Set to
NO, SLURM's default: the job is accepted and then waits. Thesbatchpage says a job asking for more than the partition's limit "will be left in a PENDING state (possibly indefinitely)", andsqueueshows the reasonPartitionTimeLimit. On the test cluster withNO, the same 48-hour job waited with that reason.
Either way the job will not run as written; only the message differs.
What usually causes it?
SLURM's source code returns this error in these cases:
- The walltime is longer than the partition's
MaxTime. The usual one: a script written for a long partition, sent to a short one. - No
--time, and the partition's default time is zero, so there is nothing to fall back on (the "missing" in the message). - A
--deadlinethe job cannot meet: the deadline is before the job could start, or the start plus the time limit runs past it.
A separate wall-time limit can come from your association (the record of your user, account and cluster) or your QOS (quality of service, a set of limits and priorities a job runs under): MaxWallDurationPerJob, shown as MaxWall. The Resource Limits page says a job over an association's limit "will be denied at submission"; a job over a QOS's limit waits, with the reason QOSMaxWallDurationPerJobLimit, unless the QOS has the DenyOnLimit flag, which "will cause the job to be denied at submission". Such a refusal does not print the message on this page. In SLURM's source, a job refused at submission by an association or QOS limit (checked only when the cluster's AccountingStorageEnforce includes limits) gets the accounting-policy error, and sbatch prints two lines: first the limit's reason, AssocMaxWallDurationPerJobLimit or QOSMaxWallDurationPerJobLimit, then Batch job submission failed: Job violates accounting/QOS policy (job submit limit, user's size and/or time limits). This was read in the source, not seen on a real cluster.
What should I try, in order?
-
Look up the partition's limits. On the login node:
Terminalsinfo -o "%P %l %L"%Pis the partition (the default one is marked*),%lthe longest time a job may ask for and%Lthe default time for a job that gives none, both asdays-hours:minutes:seconds.scontrol show partition <name>shows the whole record for one partition. -
Set
--timewithin the limit. Thesbatchpage lists the formats:minutes,minutes:seconds,hours:minutes:seconds,days-hours,days-hours:minutesanddays-hours:minutes:seconds. So--time=1-00:00:00and--time=24:00:00both ask for one day. -
If the script has no
--time, add one. Even where the partition has a default, a walltime close to what the job needs helps the scheduler start it sooner; Why is my job still waiting? explains backfill. -
Or move the job to a partition with a longer limit (
--partition), if one exists and you may use it. -
Check your association's and QOS's limits if the time fits the partition and the job is still refused or waits.
sacctmgr show associations users=$USER format=Account,Partition,Qos,MaxWalllists your accounts with their QOS and per-job wall-time limit;sacctmgr show qos format=Name,MaxWall,Flagslists each QOS's limit and flags such asDenyOnLimit. -
If the work needs longer than any partition allows, split it into jobs that each fit and continue from one to the next: Chain jobs and job arrays and CANCELLED ... DUE TO TIME LIMIT cover how.
The partition names and their limits are local to each cluster; your cluster's documentation lists them.
Set up → Resources holds the walltime, and pre-flight checks it before you submit. If sbatch still refuses the job, the run strip shows sbatch's own message and nothing is submitted.