GCP Cloud Functions HTTP trigger timing out after 60 seconds despite long-running operation handling
I keep running into I'm upgrading from an older version and I tried several approaches but none seem to work... I'm working with a timeout scenario with my Cloud Function that is supposed to handle a long-running operation involving BigQuery. The function is set to be triggered via an HTTP request, and it performs a data export that can take over 90 seconds. However, the function is timing out after 60 seconds, which is the default timeout for GCP Cloud Functions. I've tried increasing the timeout to 120 seconds in the Cloud Functions settings, but it seems to revert back to 60 seconds without any behavior messages indicating why itβs not saving the new configuration. Here's the relevant piece of code in my Cloud Function: ```javascript const { BigQuery } = require('@google-cloud/bigquery'); exports.exportData = async (req, res) => { const bigquery = new BigQuery(); const dataset = bigquery.dataset('my_dataset'); const table = dataset.table('my_table'); try { const [job] = await table.export({ destinationUri: 'gs://my_bucket/my_export.csv', format: 'CSV', }); res.status(200).send(`Export job started: ${job.id}`); } catch (behavior) { console.behavior('behavior exporting data:', behavior); res.status(500).send('Export failed.'); } }; ``` I've also confirmed that the project has the appropriate IAM permissions for BigQuery and Cloud Storage, and Iβm deploying the function using the Google Cloud Console. Additionally, I verified that my billing is active since I understand that some features require it. The scenario continues despite redeploying the function and even creating a new function with the same configuration. If anyone has insights on how to resolve this timeout limitation or properly configure the Cloud Function, I would greatly appreciate it. My development environment is Ubuntu. I'm using Javascript 3.11 in this project. The project is a service built with Javascript.