mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-15 20:52:52 -05:00
Webhooks randomly fail with 408 timeout #2618
Closed
opened 2025-11-02 04:42:16 -06:00 by GiteaMirror
·
25 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16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0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
issue/stale
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#2618
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sbrl on GitHub (Dec 4, 2018).
[x]):Description
I've setup a webhook between my server and a server at a remote location, I'm getting random failures. Some webhooks go through fine, and others die for some strange reason.
Setup:
Gitea claims the following in the webhook log:
...but the remote server's nginx claims that it's Gitea's fault for not sending a complete request in time:
The remote server has a good-quality fibre line. The git server has a stable 100mb/sec connection from KimSufi / OVH. Why the timeout?
Annoyingly, it always works if I hit "test delivery" - it's only genuine push events that are causing problems.
Screenshots
Edit: Nope, it doesn't always work with the "test delivery" button. I've just got this:
....clicking the "test delivery" button again causes the next one to succeed though.
@sbrl commented on GitHub (Jan 13, 2019):
Anyone at all? @lunny? Someone?
@barryp commented on GitHub (Jan 21, 2019):
I'm getting a similar thing sort of randomly
If I try a Test Delivery, it usually works fine, although that could be because the first invocation already did some time-consuming downloads - and the second invocation can complete much quicker. I'm using the same webhook @sbrl is using, although not behind nginx. The script it invokes can take maybe 5-15 seconds, perhaps even longer. It'd be nice to know what the timeout was, and even better if it could be configurable.
@sbrl commented on GitHub (Jan 23, 2019):
I think the timeout is already configurable, @barryp. It's this in
custom/app.ini:....60 is the value I have set. If I try the "test" delivery, it does work fine some of the time. If I try it manually with
curlfrom the same host, it always works. I think it's definitely a bug in Gitea.@sbrl commented on GitHub (Jan 23, 2019):
I can confirm that this is still an issue with the latest v1.7.0 release of Gitea.
@sbrl commented on GitHub (Feb 4, 2019):
Furthermore, I have a
tcpdumpcapture that demonstrates the issue. It's a HTTPS connection, but hopefully still proves useful. Contact me (my email address isbugs at starbeamrainbowlabs dot com) to obtain said dump.(Note to self: It's in my downloads)
@lunny commented on GitHub (Feb 5, 2019):
Can not reproduce on try.gitea.io and my instances.
@sbrl commented on GitHub (Feb 6, 2019):
@lunny Oh dear. That's awkward. Do you have an email address I can send this packet capture to, if you think it'd help?
If further details are needed, I could try doing it over regular http. If you've got any other suggestions as to what could potentially be the cause, I'd love to hear it and I'll investigate.
I'm currently investigating using the git post-receive hook instead and writing a bash script as a workaround.
@joyqat commented on GitHub (Mar 1, 2019):
Have the same problem

It might be a network problem. Does Gitea have a "retry when failed" config?
@lunny commented on GitHub (Mar 1, 2019):
@sbrl You can send message to me on discord.
@stale[bot] commented on GitHub (Apr 30, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@sbrl commented on GitHub (May 1, 2019):
Looks like I have issues with GitHub sending Webhooks to the same server, so I think it's probably a network issue - or something else on my end. Thanks for investigating though!
@c0h1b4 commented on GitHub (Aug 5, 2019):
I am having this same issues on a kubernetes deployment of Gitea with Drone.io.
Randomly Delivery: Post https://xxxxx/hook?...: dial tcp: i/o timeout
Sometimes it goes smooth, sometimes it stalls. Then if I press "Test Delivery" it goes thru. An auto retry with a X number of tries would probably fix it.
@lafriks commented on GitHub (Aug 5, 2019):
That could also be network connectivity issues or dns problems
@c0h1b4 commented on GitHub (Aug 6, 2019):
No. The issue here is that I'm using a small arm cluster with kubernetes. Sometimes the timeout is > 5 secs. I fixed increasing the webhook timeout to 30 secs. But I believe that an automatic retry for a custom number of tries would be very welcome.
@sbrl commented on GitHub (Aug 7, 2019):
What a co-incidence, @c0h1b4! My situation was something like this:
Gitea server ----> [ Internet ] -----> Home router ------> Raspberry Pi
If you're having issues with arm, maybe it's a bug in the linux networking stack for arm? I've no clue how to start debugging that though.
I'm pretty sure it's a network issue and nothing to do with Gitea. I know this because I setup a GitHub webhook that pointed tot he same place, and it also failed randomly in the exact same fashion.
I ended up writing a PHP proxy script that does the automatic retry that I run on a more stable box in the cloud (incidentally, this is the same box that has the Gitea server running). Said script looks a bit like this: https://pastebin.com/Un9B01s1
Very curious indeed.
@src386 commented on GitHub (Oct 14, 2019):
I think I have the same issue, in a amd64 Docker environment.
Test delivery never worked (i/o timeout) but using curl with the same url works.
Tested both https (via traefik) and http (direct container to container).
Adding the
DELIVER_TIMEOUT = 60option slightly improves the situation, now I get HTTP 500, at least it's something.@sbrl commented on GitHub (Oct 15, 2019):
Have you tried it with GitHub too, @src386?
@deanpcmad commented on GitHub (Oct 27, 2019):
I'm also having this issue and I've tried multiple ways of trying to fix it...
I get the same i/o timeout issue no matter what I do. Of course webhooks are quite important especially with CI/CD. I was hoping to move to Gitea this weekend but after spending hours trying to get this work, I'm not sure now lol
Edit: using the latest stable version of Gitea btw which is 1.9.4
Another edit an hour later: I've sorted it. Turns out Drone checks if there's a
.drone.ymlfile and if there isn't one, it won't allow a webhook? Very odd but glad I've sorted it!@c0h1b4 commented on GitHub (Oct 28, 2019):
Did you tried playing with the
DELIVER_TIMEOUTparameter in the config? It helped me to fix this issue.@sbrl commented on GitHub (Oct 29, 2019):
Many root causes, 1 symptom.
@Veitor commented on GitHub (Mar 3, 2020):
same problem..
DELIVER_TIMEOUT=30and still timeout.curl <webhook URL>command inside my gitea container, it's very fast and no problem.How can it time out?
@Veitor commented on GitHub (Mar 3, 2020):
ok. I have solved this problem.
my gitea repository's webhook is Drone URL. and the point is that CI
repository - setting - Main - Configurationspecified yaml file named.drone.yml, and my git repository's file nameddrone.yml!!that's worker after modified file name... :)
However, this problem should not caused timeout error, network has no problem!
@deanpcmad commented on GitHub (Mar 3, 2020):
^ Yeah my thoughts too
@sbrl commented on GitHub (Mar 6, 2020):
Glad you fixed it! :D
Although for future reference if you see these symptoms, it's almost certainly the particular issue I experienced here.
@ryanlelek commented on GitHub (Oct 13, 2020):
This thread helped.
DELIVER_TIMEOUTto 30 (or 60) but still had issues.drone.ymlto repo fixed the problem (if your webhook destination is Drone)Not scientific, sharing my vague experience with others that find this via search :)