Skip to content
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

🐛 BUG: Large objects from Astro to UI Framework as properties cause memory error in SSR #3802

Closed
1 task
mkv27 opened this issue Jul 2, 2022 · 3 comments
Closed
1 task
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@mkv27
Copy link

mkv27 commented Jul 2, 2022

What version of astro are you using?

1.0.0-beta.63

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

Large objects cause this memory error in Vercel:

ERROR	Unhandled Promise Rejection 
{"errorType":"Runtime.UnhandledPromiseRejection",
"errorMessage":"RangeError: Maximum call stack size exceeded","reason":{"errorType":"RangeError",
"errorMessage":"Maximum call stack size exceeded",
"stack":["RangeError: Maximum call stack size exceeded","    
at _a.arrayBuffer (file:///var/task/node_modules/astro/dist/runtime/server/response.js:52:18)","   
 at processTicksAndRejections (node:internal/process/task_queues:96:5)","   
  at async setResponse (file:///var/task/node_modules/@astrojs/vercel/dist/serverless/request-transform.js:65:17)","    
  at async Server.handler (file:///var/task/node_modules/@astrojs/vercel/dist/serverless/entrypoint.js:21:5)"]},
  "promise":{},
  "stack":["Runtime.UnhandledPromiseRejection: RangeError: Maximum call stack size exceeded","    
  at process.<anonymous> (file:///var/runtime/index.mjs:775:15)","    
  at process.emit (node:events:539:35)","    
  at emit (node:internal/process/promises:140:20)","    
  at processPromiseRejections (node:internal/process/promises:274:27)","    
  at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Unknown application error occurred

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-yjkevk?file=src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
@mkv27 mkv27 changed the title 🐛 BUG: Large objects from Astro to UI Framework as properties cause memory error 🐛 BUG: Large objects from Astro to UI Framework as properties cause memory error in SSR Jul 2, 2022
@natemoo-re natemoo-re added - P4: important Violate documented behavior or significantly impacts performance (priority) s1-small labels Jul 7, 2022
@natemoo-re
Copy link
Member

Very odd, thanks for the reproduction, we'll take a look at this as soon as we can!

@matthewp any insight into what's going on here?

@matthewp
Copy link
Contributor

matthewp commented Jul 7, 2022

Yeah, somewhat of an idea, i'll take this one.

@matthewp
Copy link
Contributor

matthewp commented Jul 8, 2022

Fixed by #3860

@matthewp matthewp closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

3 participants