Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argument list too long #619

Closed
davama opened this issue Jan 19, 2023 · 2 comments
Closed

argument list too long #619

davama opened this issue Jan 19, 2023 · 2 comments

Comments

@davama
Copy link

davama commented Jan 19, 2023

Hello,

We have a simple hook that accepts the headers and payload as arguments for the script:

    {
        "id": "microservice",
        "execute-command": "script.py",
        "command-working-directory": "/etc/webhook",
        "include-command-output-in-response": true,
        "pass-arguments-to-command": [
            {
                "source": "entire-headers"
            },
            {
                "source": "entire-payload"
            }
        ]
    }

We are trying to send a payload with thousands of keys, but webhook gives this error:

[webhook] 2023/01/19 15:09:55 [94fef6] error occurred: fork/exec /etc/webhook/script.py: argument list too long

Looking around I found this issue/comment which mentioned the stream output approach.

There is also this PR which implements this stream option.

So I simply wanted to make sure, is the PR and the issue option the same solution?
And would it help me to solve my issue?

Any input is appreciated

Best,
Dave

@davama
Copy link
Author

davama commented Jan 19, 2023

Playing around, i figured out how to use a hook with encoded data:

https://github.com/adnanh/webhook/blob/master/docs/Hook-Examples.md#pass-file-to-command-sample

Added this hook as a workaround.

@davama
Copy link
Author

davama commented Feb 17, 2023

argument list too long is a linux limitation (if my memory serves me right)

Dont see a solution for this.

@davama davama closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant