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.

Getting errors when do serverless deploy

See original GitHub issue
serverless deploy --verbose

<--- Last few GCs --->

   57874 ms: Scavenge 1323.2 (1434.4) -> 1323.2 (1434.4) MB, 24.8 / 0 ms [allocation failure].
   57899 ms: Scavenge 1323.2 (1434.4) -> 1323.2 (1434.4) MB, 24.7 / 0 ms [allocation failure].
   57924 ms: Scavenge 1323.2 (1434.4) -> 1323.2 (1434.4) MB, 25.0 / 0 ms [allocation failure].
   57949 ms: Scavenge 1323.2 (1434.4) -> 1323.2 (1434.4) MB, 24.8 / 0 ms [allocation failure].
   57973 ms: Scavenge 1323.2 (1434.4) -> 1323.2 (1434.4) MB, 24.8 / 0 ms [allocation failure].

<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: Scavenger: semi-space copy
 Allocation failed - process out of memory
[1]    47248 abort      serverless deploy --verbose

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

ValkyrieUKcommented, Aug 11, 2017

I had to nest the environment object inside the custom section.

    environment: ${file(./env.yml):${opt:stage, self:provider.stage}}

And then reference variables like so.

TableName: ${self:provider.custom.environment.CACHE_DB_NAME}

I also changes the env.yaml file too something like this.

# variables for "dev" stage
# General
  SERVICE: ${self:service}
  STAGE: ${opt:stage, self:provider.stage}
  REGION: ${opt:region, self:provider.region}
  TOKEN_SECRET: token-secret-123
# Database
  CACHE_DB_NAME: ${self:service}-cache-${opt:stage, self:provider.stage}
  USERS_DB_NAME: ${self:service}-users-${opt:stage, self:provider.stage}
# Cognito
  USER_POOL_ID: eu-west-mypool-id
# Providers
  PROVIDER_GOOGLE_SECRET: cg-mock-secret

Then when deploying pass in stage and region flags.

sls deploy --stage dev --region eu-west-1

Now it seems to be working fine for me.

zorpheuxcommented, Aug 28, 2017

@laardee I fixed my own issue using your observation above. Would be nice if you’d submit a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 10 Serverless Deployment Errors (and How to Fix Them)
1. Invalid CloudFormation state · 2. Unable to fetch parameters · 3. API Gateway: No integration defined for method · 4. Codebuild deploy...
Read more >
Serverless Deploy Error
Hi I tried to run serverless deploy but I get the error on my terminal. Could not locate deployment bucket. Error: Profile development...
Read more >
Serverless deploy - Function not found - sls deploy
I've faced this issue with Serverless. The issue is caused by how Serverless handles, tracks, and deploys your functions. When you deleted the...
Read more >
Auto-Retrying Serverless Errors
This error happens when multiple Serverless services that share the same API Gateway project are being deployed concurrently.
Read more >
Silent failure of Serverless deploy · Issue #8839
With large files and slow/unstable network, Serverless fails to deploy stack without causing error status code or error message.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found