Snowplow collector throws InterruptedException

Hi @Serhii_Dimchenko if you’re getting 502s when a collector shuts down, then it’s probably because your load balancer is still sending http requests to the pod even after the pod starts to terminate. To avoid the 502s you need to make sure the pod stays alive for longer than it takes the load balancer to re-route requests to a different pod. There are two configuration changes that can help you with this:

  • Set the collector config option preTerminationPeriod (described here) to a much larger value, so the collector services requests for longer after receiving the sigterm.
  • Set the kubernetes pod config option terminationGracePeriodSeconds (described here) so kubernetes allows the collector pod plenty of time to stay alive after receiving the signal.

If it helps, I wrote a bit about configuring graceful shutdown in the collector 2.5.0 release notes.

1 Like