few-tomato-6859
07/07/2023, 1:33 PMdeploy.yaml directive services: nginx: timeout: XY but this sets this timeout globally, which is not what I want.
• Optimize our application code to start serving the file immediately instead of after download by the server. I have done this but it didn't bring the desired result. (Code example in first thread comment)few-tomato-6859
07/07/2023, 1:34 PM$outputStream = fopen('<php://output>', 'wb');
$fileStream = $this->flysystemService->readStream(
DataImportConstants::IMPORT_FILESYSTEM_S3,
$this->config->getEmarsysS3CsvPath()
);
stream_set_write_buffer($outputStream, 0);
stream_set_chunk_size($fileStream, self::STREAM_CHUNK_SIZE);
stream_copy_to_stream($fileStream, $outputStream);
if (is_resource($fileStream)) {
fclose($fileStream);
}
if (is_resource($outputStream)) {
fclose($outputStream);
}quiet-coat-80608
07/07/2023, 6:23 PMfew-tomato-6859
07/10/2023, 12:57 PM