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
{{ message }}
Repository navigation
Uploading larger video file: Hangs on "this item is in processing" #529
When uploading a larger video file (MOV), the upload is finished. But the file cannot be accessed, because it hangs on the status "this item is in processing".
Steps to reproduce
Upload lager file (I think it doesn't have to be a video). File size: ~190 MB
Wait until upload finishes.
Expected behavior
The item should be processed and the file should be accessible trough the UI.
Actual behavior
The status hangs on "this item is in processing". File cannot be accessed (even after a longer time waiting).
Confusing for the user as no error message is shown and the file cannot be removed/deleted either.
WARNING: Sun Mar 30 16:31:47 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 202)
WARNING: Sun Mar 30 16:31:53 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 977)
WARNING: Sun Mar 30 16:32:03 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 202)
WARNING: Sun Mar 30 16:32:24 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 202)
WARNING: Sun Mar 30 16:33:04 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 298)
WARNING: Sun Mar 30 16:34:25 2025 -> INSTREAM: Size limit reached, (requested: 1024, max: 796)
Additional context
Seems to be a problem with ClamAV refusing to scan such a big file.
However, there are no config options in .env or clamav.yml raising limits.
Generally, the OpenCloud should not deny access to files which cannot be scanned by ClamAV. There should be an option to "unlock" or delete these files.
Unfortunately, it doesn't have any effect neither.
If i set ANTIVIRUS_MAX_SCAN_SIZE: 512M to opencloud.yml the upload still fails.
Could you please advise me (us) a bit more?
Without the parameter the file can not be finally processed (remains transparent):
Even if this would be configurable, I think it most important that an uploaded file doesn't get "blocked" when something wents wrong in the "post uploading process".
Because when this process never finishes, the file cannot be accesses, but also not deleted.
The only way out now seems to SSH into server, identifying the file, and deleting it.
So the user uploading a file which gets stuck in processing should:
get a clear notfication why the processing ccan't be finished.
get the the opportunity to at least delete the file.
@DecaTec first of all, thank you very much for your report! Before I try to address it, here's my test environment so we're starting from the same situation.
Notes
please review the configurations and change each path to your need, e.g. $HOME/Developer/fschade/opencloud/tmp/env/clamav/data/ becomes PATH_TO_YOUR_DATA_ROOT/data/
i tested each of those files individually and mixed.
Result
All of my tests worked without problems, unfortunately I can't see how you set ANTIVIRUS_MAX_SCAN_SIZE, for example I used ANTIVIRUS_MAX_SCAN_SIZE=25MB for testing
Regarding your ideas on how to better inform users about errors, I agree; it's not optimal this way. We decided to do this because virus scanning is a very sensitive topic and clearly belongs in the hands of an admin and needs to be well thought out.
The assumption at the time was that the admin would have logging (and possibly alerting) and track precisely these occurrences and then adjust the configuration if necessary.
Can you briefly walk us through what would be optimal for you?
@tbsbdr is our usability expert; I'm sure we have potential for optimization here; perhaps he has other ideas.
CLAMAV=:clamav.yml (removed the #, so that line is not commented out)
Did not modify the clamav.yml.
I haven't set ANTIVIRUS_MAX_SCAN_SIZE at all. When I get this right, in a docker compose setup, everything should be configures by the .env (no direct modifications in the *.yml files and also no manual editing in the config files inside the containers).
the clamav source sample conf contains the following
# Files larger than this limit won't be scanned. Affects the input file itself
# as well as files contained inside it (when the input file is an archive, a
# document or some other kind of container).
# Value of 0 disables the limit.
# Note: disabling this limit or setting it too high may result in severe damage
# to the system.
# Technical design limitations prevent ClamAV from scanning files greater than
# 2 GB at this time.
# Default: 100M
#MaxFileSize 400M
I tend to set the default to 100M and to include an option in the docker example. I get why you want to have 10G... but the system is used by several hundred users at the same time, which means that such a high value quickly multiplies immeasurably
wont work, at least not with such huge files like your example of 20GB, CAV has a build in limit too, im not sure but if i remember right its 4GB... even if the limit is disabled by setting 0 in the conf...
i have some more ideas on that topic, I'm currently trying to figure out how we can make the limits more flexible
Activity
criegerde commentedon Mar 30, 2025
Increased e.g. to 512 MB in clamav.yaml
clamav: image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest} # release notes: https://blog.clamav.net environment: CLAMD_CONF_MaxFileSize: 512M CLAMD_CONF_MaxScanSize: 512M CLAMD_CONF_StreamMaxLength: 512M CLAMD_CONF_PCREMaxFileSize: 512MNow uploading bigger files (e.g. 512M) works as expected.
micbar commentedon Mar 30, 2025
This behavior is known in combination with clamav.
There is a setting where you can set the limit on openCloud. https://github.com/opencloud-eu/opencloud/tree/main/services/antivirus#maximum-scan-size
criegerde commentedon Mar 31, 2025
It doesn't seem to have any effect when setting ANTIVIRUS_MAX_SCAN_SIZE in clamav.yml
micbar commentedon Mar 31, 2025
Yes. It needs to go into opencloud.yml
criegerde commentedon Mar 31, 2025
Unfortunately, it doesn't have any effect neither.
If i set ANTIVIRUS_MAX_SCAN_SIZE: 512M to opencloud.yml the upload still fails.
Could you please advise me (us) a bit more?
Without the parameter the file can not be finally processed (remains transparent):
Using the parameter:
micbar commentedon Mar 31, 2025
@fschade can you help?
DecaTec commentedon Mar 31, 2025
Thanks for you feedback!
Even if this would be configurable, I think it most important that an uploaded file doesn't get "blocked" when something wents wrong in the "post uploading process".
Because when this process never finishes, the file cannot be accesses, but also not deleted.
The only way out now seems to SSH into server, identifying the file, and deleting it.
So the user uploading a file which gets stuck in processing should:
micbar commentedon Mar 31, 2025
You can configure a background job to restart the postprocessing job. https://github.com/opencloud-eu/opencloud/blob/main/services/postprocessing/README.md
fschade commentedon Mar 31, 2025
i need one moment more...
linux/arm64/v8 in the manifest list entries: no match for platform in manifest: not foundufffschade commentedon Mar 31, 2025
@DecaTec first of all, thank you very much for your report! Before I try to address it, here's my test environment so we're starting from the same situation.
Notes
please review the configurations and change each path to your need, e.g.
$HOME/Developer/fschade/opencloud/tmp/env/clamav/data/becomesPATH_TO_YOUR_DATA_ROOT/data/Config
.envrc
clamd.conf
freshclam.conf
Services
Test scenarios i tried
i tested each of those files individually and mixed.
Result
All of my tests worked without problems, unfortunately I can't see how you set
ANTIVIRUS_MAX_SCAN_SIZE, for example I usedANTIVIRUS_MAX_SCAN_SIZE=25MBfor testingRegarding your ideas on how to better inform users about errors, I agree; it's not optimal this way. We decided to do this because virus scanning is a very sensitive topic and clearly belongs in the hands of an admin and needs to be well thought out.
The assumption at the time was that the admin would have logging (and possibly alerting) and track precisely these occurrences and then adjust the configuration if necessary.
Can you briefly walk us through what would be optimal for you?
@tbsbdr is our usability expert; I'm sure we have potential for optimization here; perhaps he has other ideas.
DecaTec commentedon Mar 31, 2025
Hello @fschade
I'm using a docker compose setup.
The only two things I've changed regarding antivir are in the
.env:START_ADDITIONAL_SERVICES="notifications,antivirus"(added,antivirus)CLAMAV=:clamav.yml(removed the#, so that line is not commented out)Did not modify the
clamav.yml.I haven't set
ANTIVIRUS_MAX_SCAN_SIZEat all. When I get this right, in a docker compose setup, everything should be configures by the.env(no direct modifications in the*.ymlfiles and also no manual editing in the config files inside the containers).fschade commentedon Mar 31, 2025
good point, ill add that config option later, @micbar do you have a preference as to what size the default should be?
DecaTec commentedon Mar 31, 2025
Maybe it would be a good idea to set a "global max. upload size", e.g. 10GB.
Then the max file size scanned by ClamAV should be the same.
fschade commentedon Mar 31, 2025
the clamav source sample conf contains the following
the sample is from: https://www.clamav.net/downloads clamav-1.0.8.tar.gz
I tend to set the default to 100M and to include an option in the docker example. I get why you want to have 10G... but the system is used by several hundred users at the same time, which means that such a high value quickly multiplies immeasurably
DecaTec commentedon Mar 31, 2025
Maybe scanning file up to e.g. 100 MB instantly and scanning all other files step by step?
Then it only should be clear for a user why the file is "locked" (e..g. showing detailed information on the tool tip).
fschade commentedon Apr 1, 2025
wont work, at least not with such huge files like your example of 20GB, CAV has a build in limit too, im not sure but if i remember right its 4GB... even if the limit is disabled by setting 0 in the conf...
i have some more ideas on that topic, I'm currently trying to figure out how we can make the limits more flexible
fschade commentedon Apr 8, 2025
@DecaTec please check #559 and if you wanna stick to 2.0 #620
If you think "scan the remaining bytes later" is essential or something that would really make sense, please submit a feature request.
Thanks for your input.
I'm closing the issue for now. If it doesn't solve your problem or doesn't resolve it, please reopen it and ping me.