firebase-backend
firebase-backend copied to clipboard
functions timeout and memory allocation
Is there any way to define the timeout and memory allocation? I was looking into the source code but couldn't find anything related to this.
If this feature is not available maybe it could be in the options object along with enableCors.
Hey, at the moment not.
If you can add that in a PR we can merge it in for you.
@UndefinedMamun You can do something like this.
import { runWith } from 'firebase-functions'
export const functionName = runWith({
minInstances: 2,
memory: '2GB',
timeoutSeconds: 30,
})
.region('europe-west1')
.firestore.document('users/{userId}')
.onCreate(async snap => {})