functions timeout and memory allocation
UndefinedMamun opened this issue · comments
Mohammad Al Mamun commented
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.
Dane Mackier commented
Hey, at the moment not.
If you can add that in a PR we can merge it in for you.
Sailesh Dahal commented
@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 => {})