question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maximum call stack size exceeded of complicated schemas (FHIR for example)

See original GitHub issue

On large schemas, Swagger UI either fails with RangeError: Maximum call stack size exceeded error or hangs with 100% CPU usage. In my case, these were the official FHIR schemas which may be downloaded by a link: https://www.hl7.org/fhir/fhir.schema.json.zip It would be enough to unzip them and copy the fhir.schema.json folder next to your swagger spec.

Q A
Bug or feature request? A bug
Which Swagger/OpenAPI version? dunno
Which Swagger-UI version? 3.13.0-3.13.2
How did you install Swagger-UI? Either with webjars or downloaded the release zip archive.
Which browser & version? Chrome 65.0.3325.181 (64-bit), FF 57.0.4 (64-bit)
Which operating system? Mac OS 10.11.6

Demonstration API definition

{"swagger": "2.0",
 "schemes": ["http"],
 "info": {"contact": {"email": "test@test.com"},
          "title": "sdfsdfsf"},
 "paths": {"/foo": {"get": {"description": "sdfsdfsdfdsf",
                            "responses": {200: {"description": "sdfsdf",
                                                "schema": {"$ref": "./fhir.schema.json/Practitioner.schema.json"}}}
}}}}

Configuration (browser query string, constructor, config.yaml)

I didn’t change enything except the url parameter: url: "/swagger/schema",

Expected Behavior

To see the schemas.

Current Behavior

Either an exception (3.13.0) or an endless 100% CPU usage (3.13.2)

Context

I figured out by crafting a small subset of definitions out of these schemas.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:38 (34 by maintainers)

github_iconTop GitHub Comments

1reaction
heldersepucommented, Jan 10, 2019

Latest version seems to have fixed all the issues I encountered before:

@shockey you can close this issue

0reactions
shockeycommented, Jan 15, 2019

thanks as always for making my job easier, @heldersepu!

Read more comments on GitHub >

github_iconTop Results From Across the Web

RangeError: Maximum call stack size exceeded
I tried to load in a rather json large schema and I get this error: RangeError: Maximum call stack size exceeded isEmpty [as...
Read more >
Azure subscription limits and quotas - Azure Resource Manager
Provides a list of common Azure subscription and service limits, quotas, and constraints. This article includes information on how to ...
Read more >
Xml - FHIR v5.0.0-snapshot3
An element that has a maximum cardinality of >1 (e.g. x..* in the definitions) may occur more than once in the instance. In...
Read more >
Using open source FHIR APIs with FHIR Works on AWS
The post explained the basic concepts underpinning FHIR, ... these larger objects can quickly exceed limits on timeouts and payload sizes (6 ...
Read more >
Schema design best practices | Cloud Bigtable Documentation
For example, in a column family called SysMonitor with column qualifiers of ProcessName ... Bigtable has a limit of 1,000 tables per instance,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found