Skip to content

feat: make tracking OOM memory issues in schema worker easier#8258

Merged
n1ru4l merged 1 commit into
mainfrom
feat-track-failing-schema-publishes
Jul 24, 2026
Merged

feat: make tracking OOM memory issues in schema worker easier#8258
n1ru4l merged 1 commit into
mainfrom
feat-track-failing-schema-publishes

Conversation

@n1ru4l

@n1ru4l n1ru4l commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

In case of an oom issue, write all the subgraphs as an artifact to s3 and add a reference to that on the trace.

I tested the flow locally by:

Setting low memory
image
Publishing a highe schema, causing an OOM for the worker thread
image

The trace is now populated with some reference:
image

And an artifact is written to our S3 bucket containing all the subgraphs involved in the composition:
image
image

…e of an oom issue, write all the subgraphs as an artifact to s3 and add a reference to that on the trace
@n1ru4l
n1ru4l force-pushed the feat-track-failing-schema-publishes branch from 464c927 to 62d0fd0 Compare July 24, 2026 13:33
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
hive 11.7.2-alpha-20260724133449-62d0fd0a4ce84c46b504dd8c7a9dfa638fd05dcf npm ↗︎ unpkg ↗︎

Comment on lines +165 to +166
// If a composition error happens due to OOM we write the subgraphs to S3
// This makes it easier to reproduce and debug the issue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technically we could do that for every composition failure. But this would end up using a lot lot more s3 storage and we do not really have a cleanup strategy. Thus only storing the OOM ones for now seems kind okay in my opinion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the future we want to store SDL on s3 exclusively anyways - as it is eating up a lot of space on postgres and would be more cost effective over there. Then this would no longer be needed.

Comment on lines +168 to +169
const span = trace.getActiveSpan();
if (span) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This behaviour is only enabled if tracing is enabled for now.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.7.2-alpha-62d0fd0, 62d0fd0, 62d0fd0a4ce84c46b504dd8c7a9dfa638fd05dcf

@n1ru4l
n1ru4l marked this pull request as ready for review July 24, 2026 14:04
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@n1ru4l
n1ru4l merged commit 1d9a85f into main Jul 24, 2026
48 of 49 checks passed
@n1ru4l
n1ru4l deleted the feat-track-failing-schema-publishes branch July 24, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant