Skip to content

Commit 95e8492

Browse files
committed
What the heck are these abysmal timeouts; closes pterodactyl#2223
1 parent d1a2805 commit 95e8492

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

app/Repositories/Wings/DaemonFileRepository.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ public function compressFiles(?string $root, array $files): array
230230
'root' => $root ?? '/',
231231
'files' => $files,
232232
],
233+
// Wait for up to 15 minutes for the archive to be completed when calling this endpoint
234+
// since it will likely take quite awhile for large directories.
235+
'timeout' => 60 * 15,
233236
]
234237
);
235238
} catch (TransferException $exception) {

config/pterodactyl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
| Configure the timeout to be used for Guzzle connections here.
8686
*/
8787
'guzzle' => [
88-
'timeout' => env('GUZZLE_TIMEOUT', 5),
89-
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 3),
88+
'timeout' => env('GUZZLE_TIMEOUT', 30),
89+
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 10),
9090
],
9191

9292
/*

resources/scripts/api/server/files/compressFiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { rawDataToFileObject } from '@/api/transformers';
44

55
export default async (uuid: string, directory: string, files: string[]): Promise<FileObject> => {
66
const { data } = await http.post(`/api/client/servers/${uuid}/files/compress`, { root: directory, files }, {
7-
timeout: 300000,
8-
timeoutErrorMessage: 'It looks like this archive is taking a long time to generate. It will appear when completed.',
7+
timeout: 60000,
8+
timeoutErrorMessage: 'It looks like this archive is taking a long time to generate. It will appear once completed.',
99
});
1010

1111
return rawDataToFileObject(data);

0 commit comments

Comments
 (0)