R
RunPod•8mo ago
danielb143

Not receiving any webhooks..

I use this worker: https://github.com/blib-la/runpod-worker-comfy However, when I put the webhook URL endpoint in the top level of the run request I don't receive any webhook on completion. When I check the status of the job it's completed together with the output image. Am I doing something wrong? And is it a risk to depend on webhooks in production since I read something about that it is unstable. Thanks
GitHub
GitHub - blib-la/runpod-worker-comfy: ComfyUI as a serverless API o...
ComfyUI as a serverless API on RunPod. Contribute to blib-la/runpod-worker-comfy development by creating an account on GitHub.
17 Replies
justin
justin•8mo ago
Is your webhook receiving the right type of request? I believe is a POST request https://docs.runpod.io/serverless/endpoints/send-requests#webhooks
A POST request goes to your URL when the job is complete. This request contains the same information as fetching the results from the /status/{job_id} endpoint.
A POST request goes to your URL when the job is complete. This request contains the same information as fetching the results from the /status/{job_id} endpoint.
Works fine for me, the first time I used it, I messed up cause I had a GET request route.
danielb143
danielb143OP•8mo ago
Yes I was aware of the post request let me show you the script in the webhook public function index() { // Get Webhook Data $webhook_data = file_get_contents('php://input');
$this->load->model('cloudservice/runpod'); $this->model_cloudservice_runpod->addWebhook($webhook_data);
$this->ping(); } @justin [Not Staff] Also did a test post request and it worked
justin
justin•8mo ago
can you show me an example request body?
danielb143
danielb143OP•8mo ago
Sure you mean the run request right One moment pls
danielb143
danielb143OP•8mo ago
danielb143
danielb143OP•8mo ago
@justin [Not Staff]
justin
justin•8mo ago
could be bc im looking on my phone but does ur url have special characters? https://dev.blendme.ai/index.php?route=cloudservice/runpod_webhook"} oh wait seems like my phone lol yea sorry not sure on my phone, so the json is messy for me, but looks right. ur webhook is on the same level as input, etc. not sure 🤔
danielb143
danielb143OP•8mo ago
Yes it's top level Yes it's top level next to input
flash-singh
flash-singh•8mo ago
whats the endpoint id? ill check logs also check your endpoint page, it shows webhook status metrics
danielb143
danielb143OP•8mo ago
8eycsqorj3o250 Thanks for checking Can't find it? I checked the log tab on the serverless endpoint page Nothing about a webhook 2024-03-28 12:46:58.151 [cw6d63h1l4j7u8] [info] Finished. 2024-03-28 12:46:58.028 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - the image was generated and converted to base64 2024-03-28 12:46:58.026 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - /comfyui/output/ComfyUI00001.png 2024-03-28 12:46:58.026 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - image generation is done 2024-03-28 12:46:58.024 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - wait until image generation is complete 2024-03-28 12:46:58.024 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - queued workflow with ID b7f07ae1-ee31-4a63-bc42-76d1a1b5c08b 2024-03-28 12:46:57.926 [cw6d63h1l4j7u8] [info] Prompt executed in 0.00 seconds 2024-03-28 12:46:57.924 [cw6d63h1l4j7u8] [info] got prompt 2024-03-28 12:46:57.923 [cw6d63h1l4j7u8] [info] runpod-worker-comfy - API is reachable 2024-03-28 12:46:57.918 [cw6d63h1l4j7u8] [info] Started.
flash-singh
flash-singh•8mo ago
theres a graph on bottom of endpoint page, shows webhook i see this error many times in logs webhook failed: status code not 200 response needs to be 200, something is wrong looks like on your api end
danielb143
danielb143OP•8mo ago
Strange, I tested my end by sending a post request myself to the endpoint and the data got saved succesfully in the database https://dev.blendme.ai/index.php?route=cloudservice/runpod_webhook
danielb143
danielb143OP•8mo ago
And this is the model
flash-singh
flash-singh•8mo ago
no clue there, i would simplify and try to see whats wrong, check the graph for valid responses
danielb143
danielb143OP•8mo ago
I have simplified it, I just store all post data in a log file, but there is still nothing in it. Do you have to add a webhook function in the dockerfile or handler? Or is it something that runpod does automatically if you add it in the top level request? Thanks
flash-singh
flash-singh•8mo ago
we do this automatically, it doesnt run in workers so it doesnt cost any compute for you
Want results from more Discord servers?
Add your server