Skip to content

DevX API Reliability Issue #1055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peombwa opened this issue Jul 5, 2022 · 2 comments · Fixed by #1102
Closed

DevX API Reliability Issue #1055

peombwa opened this issue Jul 5, 2022 · 2 comments · Fixed by #1102
Assignees
Labels
status: needs-discussion An issue that requires more discussion internally before resolving

Comments

@peombwa
Copy link
Member

peombwa commented Jul 5, 2022

Describe the bug
500 out-of-memory error when calling DevX API with forceRefresh=true when graphVersion is beta and intermittently in v1.0.

To Reproduce
Steps to reproduce the behavior:

  1. Open https://graphexplorerapi.azurewebsites.net/openapi/operations?openapiversion=3&style=Powershell&graphVersion=beta&forceRefresh=true from your browser.
  2. See error: {"StatusCode":500,"Message":"Exception of type 'System.OutOfMemoryException' was thrown."}

Expected behavior
An OpenAPI document should be returned when forceRefresh=true.

Additional context
The issue is blocking PowerShell's weekly OpenAPI refreshes from getting the latest API refreshes.

@irvinesunday irvinesunday self-assigned this Jul 6, 2022
@irvinesunday
Copy link
Contributor

According to App Insights telemetry, this is where the exception gets thrown:

var doc = new OpenApiStringReader().Read(sb.ToString(), out _);
.
During fixing of references in the OpenAPI document, the document is first serialized into a StringBuilder object. The conversion of the StringBuilder object to a string and the OpenAPI.NET library method that reads this string (OpenApiStringReader().Read()) ends up allocating a significant amount of memory for this process, especially for beta paths, which are appr. double the size of v1.0 paths. There is need to review this fixing of references.

@irvinesunday
Copy link
Contributor

This has been temporarily resolved by scaling up the DevX API app service plan to allocate more memory.

@irvinesunday irvinesunday added the status: needs-discussion An issue that requires more discussion internally before resolving label Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-discussion An issue that requires more discussion internally before resolving
Projects
None yet
2 participants