Giter VIP home page Giter VIP logo

Comments (6)

nkirsch avatar nkirsch commented on May 19, 2024

Seems to break at 100K:

dev % dd if=/dev/zero of=output.zero bs=1K count=50                                                                                                                                                                                                                      
50+0 records in
50+0 records out
51200 bytes (51 kB, 50 KiB) copied, 0.000235105 s, 218 MB/s

dev % cat output.zero | curl -X POST http://localhost:8080/function/func_webhookstash --data-binary @-
Stashing request

dev % dd if=/dev/zero of=output.zero bs=1K count=100
100+0 records in
100+0 records out
102400 bytes (102 kB, 100 KiB) copied, 0.000343563 s, 298 MB/s

dev % cat output.zero | curl -X POST http://localhost:8080/function/func_webhookstash --data-binary @-    

from faas.

nkirsch avatar nkirsch commented on May 19, 2024

Note this also fails using the -d @IMG_0733.JPG method (vs cat and -d @-)

from faas.

alexellis avatar alexellis commented on May 19, 2024

I'll have a look into this issue, but a web-hook is just an event - not a blob. I.e. a JSON POST rather than binary images or dd-generated etc. It should be a short message in JSON plain-text or application/json.

If you want to look at the sample/test function's source it's available in the repository @ https://github.com/alexellis/faas/blob/master/sample-functions/WebhookStash/handler.go

You can run the function stand-alone for testing docker stack rm func followed by docker run -p 8080:8080 -ti alexellis2/faas-webhookstash

from faas.

alexellis avatar alexellis commented on May 19, 2024

Looks like the Golang buffered pipe in (watchdog process) was blocking at 64kb.

This is the fix - https://github.com/alexellis/faas/compare/watchdog_buffer_fix

If you'd like to try this before it's released then checkout the watchdog_buffer_fix branch and re-build the fwatchdog binary with the "build.sh" script in the watchdog folder. Then copy it to the webhook stash function.

Alternatively - try swapping the tag latest for issue_31 in docker-compose.yml for the webhookstash function.

from faas.

alexellis avatar alexellis commented on May 19, 2024

Fixed by #33

from faas.

nkirsch avatar nkirsch commented on May 19, 2024

Thanks, @alexellis !

from faas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.