user-1
(User 1)
September 6, 2024, 6:55am
1
This topic was automatically generated from Slack. You can find the original thread here .
Hi Pipedream users, is it me or someone has faced this when executing workflow with running query against a postgres DB, query terminates after one minute, less than 1 minute query are working fine, no query timeout set on the database, workflow timeout setting more than 5 minutes, Can someone help?
user-1
(User 1)
September 6, 2024, 6:55am
2
Maybe the Node.js Postgres DB client itself has a default of 1 min timeout?
user-1
(User 1)
September 6, 2024, 6:55am
3
Are you using a pre-built Postgres DB action in your workflow? Or Node.js code directly?
user-1
(User 1)
September 6, 2024, 6:55am
4
its just a sql statement a function that i invoke as seen below no Node.js
user-1
(User 1)
September 6, 2024, 6:55am
5
Ah got it. So that still uses pipedream components under the hood.
import pg from "pg";
import format from "pg-format";
import {
sqlProp,
sqlProxy,
ConfigurationError,
} from "@pipedream/platform";
export default {
type: "app",
app: "postgresql",
propDefinitions: {
schema: {
type: "string",
label: "Schema",
description: "Database schema",
async options() {
return this.getSchemas();
},
},
This file has been truncated. show original
user-1
(User 1)
September 6, 2024, 6:55am
6
It looks like the default options for the pg
node lib are no timeout at all: pg.Client – node-postgres
user-1
(User 1)
September 6, 2024, 6:55am
7
It doesn’t look like any overrides are being past:
? ssl
: undefined;
},
/**
* A helper method to get the configuration object that's directly fed to
* the PostgreSQL client constructor. Used by other features (like SQL
* proxy) to initialize their client in an identical way.
* @returns {object} - Configuration object for the PostgreSQL client
*/
getClientConfiguration() {
const {
host,
port,
user,
password,
database,
} = this.$auth;
return {
host,
user-1
(User 1)
September 6, 2024, 6:55am
8
Are you sure your db server is configured to not timeout after a minute? That is the most likely issue I think
user-1
(User 1)
September 6, 2024, 6:55am
9
Its not configured, have just confirmed again
user-1
(User 1)
September 6, 2024, 6:55am
11
I am migrating from shipyard since they are closing down, jobs runs fine for over 5 minutes, in pipedream it terminates after a minute
user-1
(User 1)
September 6, 2024, 6:55am
12
Could you check this setting too?
idle_in_transaction_session_timeout
user-1
(User 1)
September 6, 2024, 6:55am
14
Hmm, then it’s looking like potentially the workflow is the culprit maybe.
Have you tried modifying the timeout on the workflow since that last time you changed it?
I wonder if the workflow’s deployment failed for some reason, maybe trying again will update the timeout
user-1
(User 1)
September 6, 2024, 6:55am
15
Something like changing it to 5 minutes and 1 second
user-1
(User 1)
September 6, 2024, 6:55am
17
after changing the timeout for the workflow to 301 seconds the step where the query takes more than one 1 minute still fails with the error I shared, i deployed and set it to run 8:00 P.M my local time but it has still failed
user-1
(User 1)
September 6, 2024, 6:55am
18
That is very weird. I think we troubleshot the best we could. Hopefully you can get more help by making a support ticket: Support - Pipedream
user-1
(User 1)
September 6, 2024, 6:55am
19
Hopefully there’s some internal logs that the PD team can see that might lead to the cause
user-1
(User 1)
September 6, 2024, 6:55am
20
Thanks for jumping in, Pierce! :skin-tone-2:
are you connecting via a static IP? (either with a VPC in Pipedream or the Shared Static IP configuration for that account in Pipedream)