Skip to content

Connect API: /actions/run endpoint taking 6-10s for simple actions #19934

@Afstkla

Description

@Afstkla

Description

When using the Pipedream Connect API to run actions, the POST /connect/{project_id}/actions/run endpoint takes 6-10 seconds when stash_id: "" is included, but only 1.5 seconds when stash_id is omitted.

Root Cause Found

Sending stash_id: "" (empty string) to initialize a new stash causes a massive performance penalty.

Request Response Time
Without stash_id ~1.5s
With stash_id: "" ~6-10s
With stash_id: "<actual_id>" (not yet tested)

Environment

  • API endpoint: https://api.pipedream.com/v1/connect/{project_id}/actions/run
  • Action tested: trengo-list-messages

Reproduction

Fast request (~1.5s):

curl -X POST 'https://api.pipedream.com/v1/connect/{project_id}/actions/run' \
  -H 'Authorization: Bearer ...' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "trengo-list-messages",
    "configured_props": { ... },
    "external_user_id": "..."
  }'

Slow request (~6-10s):

curl -X POST 'https://api.pipedream.com/v1/connect/{project_id}/actions/run' \
  -H 'Authorization: Bearer ...' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "trengo-list-messages",
    "configured_props": { ... },
    "external_user_id": "...",
    "stash_id": ""
  }'

Impact

We use stash_id: "" on the first action of a workflow to initialize a stash for sharing data between subsequent actions. This 5-8 second penalty on stash creation significantly impacts our workflow execution times.

Expected Behavior

Creating a new stash (via stash_id: "") should not add significant latency compared to requests without stash.

Reference

The Pipedream Connect demo at https://pipedream.com/connect/demo?app=trengo&component=trengo-list-messages&tab=debug shows runtimes of 1-2 seconds, which matches our results when stash_id is omitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions