I have subscribed for 'repo:push' notifications, and have found that the associated endpoint is hit multiple times when this occurs.
When I receive the notification I am processing a file and uploading to an AWS s3 bucket, then returning a 200 response.
I suspect that the notification requires an acknowledgement in a certain amount of time, and I am not responding quickly enough, thus the 2nd, and sometimes 3rd, 'X-Attempt-Number'.
Can someone clarify if my assumption is correct? Is there a way to adjust the timeout for the notification response? Is there a standard way of handling these notifications?
Hi @Corey Malcom ,
Bitbucket expects the response to a request within 10 seconds. If there is no response after 10 seconds, the request will timeout and Bitbucket will resend the request up to two more times. (This is documented here)
I'm afraid that we cannot adjust the timeout, the suggestion mentioned in the documentation I linked is:
To avoid timeouts, you can acknowledge receipt of the request by replying with an appropriate response before doing any expensive processing on your end.
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.