From bed107b031032b6cc4016ad41e9e73da274405a5 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 9 May 2025 09:18:01 +0100 Subject: [PATCH] Reduce Last.fm API pool idle timeout time to force re-connections Changing the maximum number of milliseconds that a pool can be idle before being terminated, Setting it to a low value so that it gets terminated and we don't get failures after the vm resumes. --- lib/last_fm/api.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/last_fm/api.ex b/lib/last_fm/api.ex index c23c18ba..7f73b9f4 100644 --- a/lib/last_fm/api.ex +++ b/lib/last_fm/api.ex @@ -116,6 +116,10 @@ defmodule LastFm.API do # so we make them shorter to leverage retries max_retries: 1, pool_timeout: 1000, + # the maximum number of milliseconds that a pool can be idle before + # being terminated, Setting it to a low value so that it gets + # terminated and we don't get failures after the vm resumes. + pool_max_idle_time: 1000, receive_timeout: 1000, connect_options: [ timeout: 2500