You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of OC_FileChunking is storing the chunks in the servers file cache (hidden/private folder on the server).
After all chunks have been received the file is reassembled and moved to the final target location.
While this approach seems valid for local filesystems this can case issues with respect to external filesystems and big files, because the final move of assembled file will consume some time.
From the overall system behavior it might be interesting to move the chunks already to the external filesystem.
My suggestion would be to store the chunks already in the target file but name it differently, append the .part and even make it hidden if possible.
This approach would speedup the process on the local filesystem as there is no reassembly step which as of today adds additional execution time.
Assembling the chunks on the external file system will be a problem though most backends don't support partial writes or appends, the only reliable way to append two uploaded chunks on an external file system would be to download both chunks and upload the result.
Moving it to the storage API might help but I only know of one backend (ftp) that might be able to provide a better then default implementation.
so I don't think it will help much in the end.
Any more ideas on this ? After reading the thread that raises some relevant issues about the proposed approaches, I can't think of any other at the moment.
I heard that 1.6.0 has configurable chunk sizes. If we can increase the chunk size to reach the max upload size, it might help when uploading files to ext storage as a single chunk, at least for bigger files.
This way the sysadmin, if they wish so, could manually increase the max upload size to bigger values to match the kind of file sizes expected in their environment.
We might want to update the protocol in this case - I can think scenarios where the chunk size can become an necessary information on the server. As of today the chunk size is not communicated.
@PVince81
Thanks for your response.
Where can I find that php-fpm or mod_php setting? Within the OC server settings (as downloaded and set by the auto-installer) or outside?
I just tried phpinfo.php and found PHP-version 5.5.21 and a lot more, but nothing about these settings. And above, I would not be able to change something there.
Shouldn't a killed process be able to recover by using the available "chunking" files?
As it is now the cashed files seem to stay forever.
@VincentvgNn it's not a setting it's your setup. phpinfo might tell you.
If the chunk files aren't complete there is no way to recover them. The client should then resend the chunk again, with a different transaction id (@dragotin can you confirm?). This would leave canceled chunks lying around, which is a known issue.
@PVince81
php-fpm was introduced from PHP 5.3.3 onwards. So I bet that I have php-fpm and and no more mod_php. Phpinfo mentions the authors for CGI / FastCGI and FastCGI Process Manager, but nothing about php-fpm or mod_php.
I seem to experience auto-kill for PHP processes at a broken connection.
@PVince81
On Feb. 13th you confirmed that chunks lying around is a known issue.
Today I tested server 8.0.2 and client 1.8.0. There was a moment where the file transfer ran very slow resulting in quite some interrupts and producing many chunks. The chunks occupied more space than the good files!
Is anyone working on solving the problem of chunks that should be automatically removed after some time?
Activity
dragotin commentedon Sep 26, 2013
👍 as mentioned in bug #2947 already which was killed by a close-bugs-no-matter-what wave unfortunately ;-)
bartv2 commentedon Oct 4, 2013
This is a good idea, we only need to add an offset header to know where in the file to write the chunk. This way the order of chunks is not important
DeepDiver1975 commentedon Oct 16, 2013
we could use the http range header for this
DeepDiver1975 commentedon Oct 16, 2013
@karlitschek oc7 I guess 😉
icewind1991 commentedon Oct 16, 2013
Assembling the chunks on the external file system will be a problem though most backends don't support partial writes or appends, the only reliable way to append two uploaded chunks on an external file system would be to download both chunks and upload the result.
DeepDiver1975 commentedon Oct 16, 2013
In such a scenario we need to stick with the approach we have today.
What about moving this to the storage api and let the storage implementation handle this?
karlitschek commentedon Oct 17, 2013
Yes. ownCloud 7
icewind1991 commentedon Oct 17, 2013
Moving it to the storage API might help but I only know of one backend (ftp) that might be able to provide a better then default implementation.
so I don't think it will help much in the end.
DeepDiver1975 commentedon Oct 17, 2013
it will help with irods as well - not the most common storage but still ..... 😉
PVince81 commentedon May 2, 2014
Any more ideas on this ? After reading the thread that raises some relevant issues about the proposed approaches, I can't think of any other at the moment.
PVince81 commentedon May 2, 2014
I heard that 1.6.0 has configurable chunk sizes. If we can increase the chunk size to reach the max upload size, it might help when uploading files to ext storage as a single chunk, at least for bigger files.
This way the sysadmin, if they wish so, could manually increase the max upload size to bigger values to match the kind of file sizes expected in their environment.
dragotin commentedon May 5, 2014
@PVince81 remember that we also introduced the chunking to not get hit by the request timeout.
DeepDiver1975 commentedon May 5, 2014
We might want to update the protocol in this case - I can think scenarios where the chunk size can become an necessary information on the server. As of today the chunk size is not communicated.
@dragotin another topic for Wednesday?
dragotin commentedon May 5, 2014
Yes, but I do not really see a big benefit in changing/configuring the chunk size.
41 remaining items
VincentvgNn commentedon Feb 13, 2015
@PVince81
Thanks for your response.
Where can I find that php-fpm or mod_php setting? Within the OC server settings (as downloaded and set by the auto-installer) or outside?
I just tried phpinfo.php and found PHP-version 5.5.21 and a lot more, but nothing about these settings. And above, I would not be able to change something there.
Shouldn't a killed process be able to recover by using the available "chunking" files?
As it is now the cashed files seem to stay forever.
PVince81 commentedon Feb 13, 2015
@VincentvgNn it's not a setting it's your setup. phpinfo might tell you.
If the chunk files aren't complete there is no way to recover them. The client should then resend the chunk again, with a different transaction id (@dragotin can you confirm?). This would leave canceled chunks lying around, which is a known issue.
VincentvgNn commentedon Feb 13, 2015
@PVince81
php-fpm was introduced from PHP 5.3.3 onwards. So I bet that I have php-fpm and and no more mod_php. Phpinfo mentions the authors for CGI / FastCGI and FastCGI Process Manager, but nothing about php-fpm or mod_php.
I seem to experience auto-kill for PHP processes at a broken connection.
VincentvgNn commentedon Mar 23, 2015
@PVince81
On Feb. 13th you confirmed that chunks lying around is a known issue.
Today I tested server 8.0.2 and client 1.8.0. There was a moment where the file transfer ran very slow resulting in quite some interrupts and producing many chunks. The chunks occupied more space than the good files!
Is anyone working on solving the problem of chunks that should be automatically removed after some time?
PVince81 commentedon Mar 23, 2015
The chunk cleanup will be a background job starting with 8.1: #14500
PVince81 commentedon Sep 21, 2015
We're past feature freeze => 9.0.
DeepDiver1975 commentedon Nov 10, 2015
closing this in favor of #20118