Skip to content

Commit

Permalink
Merge pull request #319 from alltilla/s3-workaround-comment-and-newsfile
Browse files Browse the repository at this point in the history
S3 workaround comment and newsfile
  • Loading branch information
MrAnno authored Oct 2, 2024
2 parents 89ba587 + 9bced16 commit 3ebb1bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/python-modules/syslogng/modules/s3/s3_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ def open(self) -> bool:
if self.is_opened():
return True

# NOTE: Creating a client via a Session object does some unusual caching, which increases memory usage
# NOTE: each reload. Because of this, we only create Session object if the role is set, and in that case
# NOTE: the memory usage is expected to behave unusually. Sometime we should investigate this further.
if self.role != "":
self.session = Session(
aws_access_key_id=self.access_key if self.access_key != "" else None,
Expand Down
6 changes: 6 additions & 0 deletions news/bugfix-318.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
`s3()`: Eliminated indefinite memory usage increase for each reload.

The increased memory usage is caused by the `botocore` library, which
caches the session information. We only need the Session object, if
`role()` is set. The increased memory usage still happens with that set,
currently we only fixed the unset case.

0 comments on commit 3ebb1bb

Please sign in to comment.