Hi Team, I am using this pact broker image : <http...
# pact-broker
a
Hi Team, I am using this pact broker image : https://github.com/pact-foundation/pact-broker-docker Recently I started getting intermittently 504 error when trying to connect to the broker. [ERROR] ExternalInstanceProviderPactTest.pactVerificationTestTemplate(PactVerificationContext) » RequestFailed Request to path 'pact-broker-url' failed with HTTP response 504. Is there anything I can do to fix this? I have the cleanup cron job already configured. Thanks in advance.
blobwave 1
Also the version which I am using is 2.110.0-pactbroker2.107.1.
y
i haven’t seen that issue before. can you enable verbose logging and check the application logs?
do you have a proxy or anything in front of your broker?
a
yes using nginx:alpine
So this is because of the proxy ?
y
I don't think so, I was just trying to get a picture of your setup. I haven't seen anything raised recently that is similar
a
Ohh ok
y
Did it co-incide with a recent pact-broker upgrade? Would you possibly be able to pin an earlier version and see if it shows up? We can then look at the delta between versions and see if any change could indicate. I would advise adding verbose logging and seeing if that throws up any more info when the error crops up
m
How long did the request take before it timed out? Do you know what API call failed? What do the logs say?
A gateway timeout indicates a slow API response, my guess is that the verification selectors are causing a slow DB query. Can you please share what you are using in that verification job? You may want to check the settings for “wip” pacts - if that’s set to some far time in the past, that could be to blame. Also worth ensuring you delete old/defunct branches
a
[ERROR] LayoutGenerationTests.pactVerificationTestTemplate(PactVerificationContext) » RequestFailed Request to path 'pact-broker-url/pacts/provider/repo-name/for-verification' failed with HTTP response 504 [ERROR] ProviderTests.pactVerificationTestTemplate(PactVerificationContext) » RequestFailed Request to path 'pact-broker-url/pacts/provider/repo-name/for-verification' failed with HTTP response 504
This is the error i get intermittently
m
that’s the error in the Pact JVM code base, what about the broker logs?