【发布时间】:2019-05-22 13:08:45
【问题描述】:
我的 firebase 函数会打开一个 sql 事务并执行一系列插入操作。虽然该功能在我的本地和 CI 系统中有效,但在连接到 Google SQL Postgres 时它不起作用
我收到超时错误。以下是日志。有什么想法吗?
5:02:29.925 pm myApp Function execution took 20280 ms, finished with status code: 500
5:02:29.915 pm myApp TimeoutError: ResourceRequest timed out
at ResourceRequest._fireTimeout (/user_code/node_modules/sequelize/node_modules/generic-pool/lib/ResourceRequest.js:62:17)
at Timeout.bound (/user_code/node_modules/sequelize/node_modules/generic-pool/lib/ResourceRequest.js:8:15)
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
5:02:29.914 pm myApp Error Express : ResourceRequest timed out
5:02:29.911 pm myApp Executing (1963639b-91e6-42c9-acdf-8cb6463d5150): ROLLBACK;
5:02:09.904 pm myApp Executing (1963639b-91e6-42c9-acdf-8cb6463d5150): INSERT INTO ...... RETURNING *;
5:02:09.893 pm myApp Executing (1963639b-91e6-42c9-acdf-8cb6463d5150): START TRANSACTION;
【问题讨论】:
-
请编辑您的问题以显示您正在使用的代码。没有这个,就只有猜测了。
标签: postgresql google-cloud-functions google-cloud-sql