Gaufrette icon indicating copy to clipboard operation
Gaufrette copied to clipboard

Copying large files leads to memory exhaustion

Open SrgSteak opened this issue 8 years ago • 4 comments

Copying large files from one stream to another can lead to a fatal error.

Copying from one local to another local adapter works (tested with ~5GB file), copying form one local to aws_s3 doesn't. (PHP Fatal error: Allowed memory size of ... exhausted in vendor/knplabs/gaufrette/src/Gaufrette/Stream/InMemoryBuffer.php on line 90)

SrgSteak avatar Feb 04 '16 19:02 SrgSteak

Hello,

I am facing the same performance issue. I cannot download big files from S3 using aws s3 adaptater. I am getting memory issue.

Furtheremore i am trying to add several bigs files in a zipArchive like that: $zipArchive->addFromString($relativePath, file_get_contents($filename));

It seems not the best solution. Do you have any ideas?

Thanks

polantis avatar May 23 '17 10:05 polantis

We plan to fix such issues in upcoming months but currently we don't have any solution, sorry.

akerouanton avatar May 24 '17 12:05 akerouanton

@SrgSteak Did you use copy('gaufrette://filesystem/file.tar.gz','/tmp/file.tar.gz')? I had the same issue, but I didn't use copy(). With copy() my application works fine.

y4roc avatar Oct 06 '17 15:10 y4roc

@thhan that ticket is nearly 2 years old. We moved to flysystem a long time ago.

SrgSteak avatar Oct 06 '17 15:10 SrgSteak