# Runahead limit not respected

**URL:** <https://cylc.discourse.group/t/runahead-limit-not-respected/838>\
**Category:** Cylc Support\
**Created:** [December 19, 2023, 5:59pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838 "2023-12-19T17:59:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [December 19, 2023, 5:59pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/1 "2023-12-19T17:59:04Z")

</div>

`2023-12-18T20:42:54Z INFO - Cylc version: 8.2.2`  
(I have observed this behavior with every cylc8.x I have used)  
suite.rc specifies `[scheduling]runahead limit=PT96H`  
The suite starts out respecting this limit. But when the suite is running a long integration (multiple weeks) at some point it starts opening cycle points much farther ahead (30 days vs 4 days expected). It does _not_ open all of the cycle points. What it does is open them incrementally, adding 1-7 open cycle points at intervals from 30 minutes to 2 hours. After a few days, there are hundreds of active cycle points, because whatever logic is causing cylc to open new points is doing so much faster than they are completed.

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [December 19, 2023, 5:59pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/2 "2023-12-19T17:59:52Z")

</div>

The runahead tasks are all very lightweight, so hundreds of active cycle points mostly slows down the GUI. It may have other impacts but that’s what I notice. But it sure seems like a bug.

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [December 19, 2023, 7:38pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/3 "2023-12-19T19:38:32Z")

</div>

That does seem like a bug, and not one we’ve seen before. It sounds like you are running in back-compat mode (`suite.rc`)? Are you able to give us a copy of the workflow config?

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [December 19, 2023, 8:07pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/4 "2023-12-19T20:07:50Z")

</div>

Does your workflow graph contain any “future triggers” - i.e. inter-cycle triggers with a positive (rather than the usual negative) offset?

```auto
foo[+PT6H] => bar # bar triggers off of foo in the NEXT cycle

```

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [December 19, 2023, 8:33pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/5 "2023-12-19T20:33:36Z")

</div>

Yes, we have PUBLISH and SCRUB tasks that are keyed on the suite arriving at a certain task in the next cycle point:

```auto
forecast_watch_log[+PT6H]:tau002 => scrub_ready & publish_ready

```

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [December 19, 2023, 8:47pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/6 "2023-12-19T20:47:28Z")

</div>

OK, I think we have a bug when there are future triggers present AND the runahead limit is expressed as a time interval rather than number of cycle points.

You can avoid the bug by changing the runahead limit (e.g. for a 6 hour cycle) from `PT96H` (96 hours) to `P16` (16 cycle points).

How many cycle points you choose will depend on what cycling sequences you have in the workflow. P16 is equivalent to PT96H if it’s just a single 6-hour cycle.

[UPDATE] bug fix posted: [Simplify and fix runahead computation. by hjoliver · Pull Request #5893 · cylc/cylc-flow · GitHub](https://github.com/cylc/cylc-flow/pull/5893)

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [December 22, 2023, 1:51am UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/7 "2023-12-22T01:51:00Z")

</div>

Thanks! I will make that change and see what happens!

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [January 10, 2024, 7:00pm UTC](https://cylc.discourse.group/t/runahead-limit-not-respected/838/8 "2024-01-10T19:00:32Z")

</div>

@hilary.j.oliver I believe this change worked. Nearly as impactful was learning about the setting in the cylc8 GUI that puts the oldest active cycle point at the top, that’s a huge improvement in usability for me. Thanks, on both counts!
