diff --git a/extensions/jupyter-adapter/src/JupyterKernel.ts b/extensions/jupyter-adapter/src/JupyterKernel.ts index 725f8394b1d..ca1a373b7f4 100644 --- a/extensions/jupyter-adapter/src/JupyterKernel.ts +++ b/extensions/jupyter-adapter/src/JupyterKernel.ts @@ -344,12 +344,12 @@ export class JupyterKernel extends EventEmitter implements vscode.Disposable { this.log(`Connecting to kernel sockets defined in ${session.state.connectionFile}...`); // Wait for the sockets to connect or the timeout to expire. Note that - // each socket has 15 second timeout for connecting, so this is just an + // each socket has 20 second timeout for connecting, so this is just an // additional safeguard. await withTimeout( this.connect(session.state.connectionFile), - 20000, - `Timed out waiting 20 seconds for kernel to connect to sockets`); + 25000, + `Timed out waiting 25 seconds for kernel to connect to sockets`); // We're connected! Establish the socket listeners return this.establishSocketListeners(); diff --git a/extensions/jupyter-adapter/src/JupyterSocket.ts b/extensions/jupyter-adapter/src/JupyterSocket.ts index 4bbea297465..f26879fce62 100644 --- a/extensions/jupyter-adapter/src/JupyterSocket.ts +++ b/extensions/jupyter-adapter/src/JupyterSocket.ts @@ -253,10 +253,10 @@ export class JupyterSocket implements vscode.Disposable { } // Compute how long we've been waiting const waitTime = Date.now() - startTime; - if (waitTime >= 15000) { - // If we've been waiting for more than 10 seconds, reject the promise - this._logger(`${this._title} socket connect timed out after 15 seconds`); - this._connectPromise.reject(new Error('Socket connect timed out after 15 seconds')); + if (waitTime >= 20000) { + // If we've been waiting for more than 20 seconds, reject the promise + this._logger(`${this._title} socket connect timed out after 20 seconds`); + this._connectPromise.reject(new Error('Socket connect timed out after 20 seconds')); this._connectPromise = undefined; // Return to the uninitialized state so a new connection can be attempted if