Skip to content

4gb memory support #807

@m4recek

Description

@m4recek

Recently, Google cloud function increased supported memory limit to 4GB however firebase is not accepting the value as a valid memory option.

Option in cloud function web interface:
Screenshot 2020-10-29 at 17 50 33

Pricing for 4gb memory:
https://cloud.google.com/functions/pricing

[REQUIRED] Environment info

firebase-tools: 8.14.1

Platform: Linux

[REQUIRED] Test case

const runtimeOpts = {
  timeoutSeconds: 300,
  memory: '4GB'
}

exports.myStorageFunction = functions
  .runWith(runtimeOpts)
  .storage
  .object()
  .onFinalize((object) = > {
    // do some complicated things that take a lot of memory and time
  });

[REQUIRED] Steps to reproduce

Deploy function with 4gb requested memory

[REQUIRED] Expected behavior

Should deploy

[REQUIRED] Actual behavior

Error: The only available memory allocation values are: 128MB, 256MB, 512MB, 1GB, 2GB

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions