1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-10-26 21:02:28 +02:00

What the heck are these abysmal timeouts; closes #2223

This commit is contained in:
Dane Everitt 2020-08-06 20:25:35 -07:00
parent d1a28051f9
commit 95e8492c5d
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
3 changed files with 7 additions and 4 deletions

View File

@ -230,6 +230,9 @@ class DaemonFileRepository extends DaemonRepository
'root' => $root ?? '/',
'files' => $files,
],
// Wait for up to 15 minutes for the archive to be completed when calling this endpoint
// since it will likely take quite awhile for large directories.
'timeout' => 60 * 15,
]
);
} catch (TransferException $exception) {

View File

@ -85,8 +85,8 @@ return [
| Configure the timeout to be used for Guzzle connections here.
*/
'guzzle' => [
'timeout' => env('GUZZLE_TIMEOUT', 5),
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 3),
'timeout' => env('GUZZLE_TIMEOUT', 30),
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 10),
],
/*

View File

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