From 26cde8b32101708df38b3d73c1d1ebae8607d0a0 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Mon, 27 Nov 2023 10:05:01 +0200 Subject: [PATCH] increase the axios request timeout (#999) Increase the timeout in order to not to repeat the provisionKubernetesNamespace requests when che-server executes the provision request lasts less then 15 sec. --- .../src/services/axios-wrapper/getAxiosInstance.ts | 2 +- packages/dashboard-frontend/src/store/SanityCheck/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dashboard-frontend/src/services/axios-wrapper/getAxiosInstance.ts b/packages/dashboard-frontend/src/services/axios-wrapper/getAxiosInstance.ts index b3d863114..21c22ea11 100644 --- a/packages/dashboard-frontend/src/services/axios-wrapper/getAxiosInstance.ts +++ b/packages/dashboard-frontend/src/services/axios-wrapper/getAxiosInstance.ts @@ -17,7 +17,7 @@ class CheAxiosInstance { private readonly axiosInstance: AxiosInstance; private constructor() { - this.axiosInstance = axios.create({ timeout: 5000 }); + this.axiosInstance = axios.create({ timeout: 15000 }); } public static getInstance(): CheAxiosInstance { diff --git a/packages/dashboard-frontend/src/store/SanityCheck/index.ts b/packages/dashboard-frontend/src/store/SanityCheck/index.ts index 83fe548a0..3693e44a7 100644 --- a/packages/dashboard-frontend/src/store/SanityCheck/index.ts +++ b/packages/dashboard-frontend/src/store/SanityCheck/index.ts @@ -27,7 +27,7 @@ import { createObject } from '@/store/helpers'; import { AppThunk } from '..'; -const secToStale = 5; +const secToStale = 15; const timeToStale = secToStale * 1000; const maxAttemptsNumber = 2;