Skip to content

Conversation

@davidvng
Copy link
Contributor

@davidvng davidvng commented Dec 7, 2023

Description

Break the acq process loop and exit the agent after 60 minutes. Must add restart: unless-stopped to docker-compose file to automatically restart the docker container everytime this occurs.

Motivation and Context

Temporary fix for UPS agent which is the biggest contributor to high memory usage among site agents. This releases that memory by exiting the agent completely, which is what we've been doing manually. A fix to pysnmp, by switching to using asyncio, will come later.

How Has This Been Tested?

Tested in lab

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mhasself
Copy link
Member

mhasself commented Dec 8, 2023

Couple things:

  • I think the restart time should be a command line parameter.
  • Right now someone runs "acq.stop()" the agent will kill itself... That's not what stopping processes normally does. Probably not a big deal but you could distinguish between those cases.

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments.

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates!

@BrianJKoopman BrianJKoopman merged commit bb03733 into main Dec 11, 2023
@BrianJKoopman BrianJKoopman deleted the ups-break branch December 11, 2023 22:44
hnakata-JP pushed a commit that referenced this pull request Apr 12, 2024
* exit ups agent after 60 min

This is a temporary workaround to a memory leak in this agent.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* no crash in test mode

* address comments

* fix log

* update docs

* fix condition

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants