Skip to content

Firebase Functions V2 - onCall Timeout #1134

@bicced

Description

@bicced

I'm trying to implement firebase functions v2. However, the runtime options I am passing into the onCall function do not seem to work. It is timing out after 60 seconds.

`const {onCall} = require("firebase-functions/v2/https");

const runtimeOpts = {
timeoutSeconds: 500,
memory: '8GB' as '8GB',
};

export const calculatev2 = onCall(runtimeOpts,
async (event: any) => {
try {
//run calculations
return({calculations: 'the calculated stuffs'});
} catch (err) {
console.log(err.message);
throw new functions.https.HttpsError('internal', 'Error in calculating', err);
}
}
);`

`⚠ functions: Your function timed out after ~60s. To configure this timeout, see
https://firebase.google.com/docs/functions/manage-functions#set_timeout_and_memory_allocation.

Error: Function timed out.
at Timeout._onTimeout (/Users/bic/.nvm/versions/node/v16.13.2/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:634:19)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)`

Related issues

[REQUIRED] Version info

node:

firebase-functions:

firebase-tools:

firebase-admin:

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

[REQUIRED] Actual behavior

Were you able to successfully deploy your functions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions