Skip to content

Do not schedule too far ahead#7868

Open
halimi wants to merge 2 commits intov3.36from
fix/schedule-too-far-ahead
Open

Do not schedule too far ahead#7868
halimi wants to merge 2 commits intov3.36from
fix/schedule-too-far-ahead

Conversation

@halimi
Copy link
Copy Markdown
Contributor

@halimi halimi commented Mar 27, 2026

Summary

This is a backport of
https://github.com/TheThingsIndustries/lorawan-stack/pull/4841
https://github.com/TheThingsIndustries/lorawan-stack/pull/4843

Due to the recent change #7832 in the scheduler we see a memory increase in GS.
This fix tries to avoid to schedule an emission to far ahead in the future, holding a go routine to long time, causing a memory increase.
Also stops the timer in the Schedule late force case if the context is cancelled.

References: https://github.com/TheThingsIndustries/lorawan-stack-support/issues/1427

Changes

  • Add a check on duty cycle limit to avoid scheduling emission too far ahead in the future
  • Stop the timer if the context is cancelled

Testing

Steps

...

Results
Regressions

...

Notes for Reviewers

...

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@halimi halimi requested a review from a team as a code owner March 27, 2026 15:24
@halimi halimi requested a review from vlasebian March 27, 2026 15:24
@halimi halimi self-assigned this Mar 27, 2026
@github-actions github-actions bot added c/gateway server This is related to the Gateway Server ui/web This is related to a web interface labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/gateway server This is related to the Gateway Server ui/web This is related to a web interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant