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.

Internal Server Error when calling /resources endpoint

See original GitHub issue

Describe the bug When trying to load you are presented with a “We could not load resource configuration” error banner. When invoking the /resources endpoint via API Gateway itself, this returns the following error:

Endpoint response body before transformations: {"errorMessage":"Response payload size (9873641 bytes) exceeded maximum allowed payload size (6291556 bytes).","errorType":"Function.ResponseSizeTooLarge"}

This means that the payload size returned by this function is larger than the default 6Mb limit.

To Reproduce Steps to reproduce the behavior: I guess this will be related to the amount of accounts / regions and resources. We currently have 10 imports from a number of accounts / regions.

Expected behavior Not to throw an error and become unusable. Perhaps this should page the response back or not use lambda to read from the DB Screenshots If applicable, add screenshots to help explain your problem. image

Browser (please complete the following information):

  • Chrome
  • Version 85.0.4183.83 (Official Build) (64-bit)

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
StewartWcommented, Sep 24, 2020

Hey @svozza thanks for the work around. I’ve noticed that if I just filter it out certain accounts it becomes usable again.

1reaction
svozzacommented, Sep 24, 2020

Hi there, thanks for raising this issue. What looks like is happening is that there are so many resources being returned by the initial query to populate the Resources sidebar that it is exceeding the lambda payload limit. Unfortunately, the only workaround I have currently is to remove one of the imported accounts to bring that number down. We are currently investigating pagination strategies to mitigate this (this is a non-trivial problem with graph databases) for the next release.

As @StewartW has pointed out, the current workaround is to filter out certain accounts in the UI rather than removing the account entirely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Internal Server Error when calling /resources endpoint #27
What looks like is happening is that there are so many resources being returned by the initial query to populate the Resources sidebar...
Read more >
Troubleshoot "internal server" error status code 500 for API ...
To resolve this error, make sure that an API method response exists for the status code returned from the backend and is mapped...
Read more >
500 Internal Server Error - Backend Server | Apigee Edge
The client application gets an HTTP status code of 500 with the message Internal Server Error as a response for API calls.
Read more >
500 Internal Server Error When Calling Service Request ...
500 Internal Server Error When Calling Service Request REST APIs ... [CDATA[CASDK-0041: An error occurred while invoking the REST endpoint.
Read more >
How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
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