Pipeline: Observing sudden slowness in pipeline build time

Article ID:360057304112
1 minute readKnowledge base

Issue

  • Suddenly we have observed that the build time in a pipeline has changed from seconds to minutes. We can see the following stack trace in the server logs:

2021-02-01 09:27:40.098+0000 [id=804]   SEVERE  o.j.p.g.n.InfluxDbNotifier#log
java.net.ConnectException: Connection timed out (Connection timed out)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
Caused: org.apache.http.conn.HttpHostConnectException: Connect to XX.XX.XX.XX:XXXX [/XX.XX.XX.XX] failed: Connection timed out (Connection timed out)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)

Resolution

In this particular case, what is causing the slowness is a timeout on the Job and Stage monitoring Plugin notification to GitHub.

In order to fix the issue, you can either solve the connection problems to your repository in the pipeline showing this behavior or you can disable temporarily the information submission to GitHub.

In order to do that, you need to go to Manage Jenkins->Configure System and uncheck the option in the Autostatus Config section.