Comments (11)
Hi,
The APP_MAX_FILE_SIZE
parameter should be provided in bytes. 100B can be too small to let CRA work properly.
Try to change this value to something more realistic: 10MB should be a good starting point
10 * 1024 * 1024 = 10485760
APP_MAX_FILE_SIZE=10485760
The value in the example docker-compose.yaml
file is 25MB for single file to scan
from clamav-rest-api.
@benzino77 Thanks for your comment.
I set APP_MAX_FILE_SIZE
to 10MB (10485760) and tried a file larger than 10MB but got the same error.
api response:
{
"success": false,
"data": {
"error": "File size limit exceeded. Max size of uploaded file is: 10485760 KB"
}
}
from clamav-rest-api.
If you set a limit to 10MB and send file greater then 10MB... well it is correct behavior.
APP_MAX_FILE_SIZE
is the upper size limit of a file which can be accepted by CRA.
from clamav-rest-api.
@benzino77 Container restarts when an error occurs. Is it also correct behavior for the container to exit?
from clamav-rest-api.
Sorry to hear it.
What is your setup? Are you trying to start CRA on docker or on k8s? Have you tried to use sample configuration from examples
directory?
I've just tested CRA on docker and k8s on my side using samples provided in examples
directory. Works without any problem - no restarts on uploading files exceeding size limit
For docker I'm on version:
docker --version
Docker version 25.0.3, build 4debf41
in case of k8s I've performed tests on 1.24.3
and 1.28.3
also works without restarts when file size limit is exceeded:
minikube profile list
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active |
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
| cluster1 | docker | docker | 192.168.58.2 | 8443 | v1.28.3 | Running | 1 | |
| minikube | docker | docker | 192.168.49.2 | 8443 | v1.24.3 | Stopped | 1 | * |
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
from clamav-rest-api.
I tried CRA on Docker using samples provided in examples
directory.
I use the same docker version.
docker --version
Docker version 25.0.3, build 4debf41
from clamav-rest-api.
Hmm. That is strange. I just tested CRA on two different environments and it works as expected. Can you provide more details about your setup?
What architecture you are running on? x86_64? ARM64 (Apple M1/M2/Mx)?
What OS you are running underneath? Windows? Linux? MacOS?
Do you introduce any changes to sample docker-compose.yaml
file included in examples
directory?
from clamav-rest-api.
I am using MacOS. I tried it in the following environments.
- x86_64
- ARM64(Apple M2)
All environments use Docker image benzino77/clamav-rest-api:1.2.2.
After a minute or two after the request, an error log is output and the system restarts. In some cases, it restarts immediately.
APP_MAX_FILE_SIZE
in docker-compose.yaml
is changed to 10485760. No other changes other than this.
from clamav-rest-api.
I have been trying to reproduce your problem but without luck.
I have setup CRA on two different machines with docker. Set the max upload file to 1MB and upload random files in a loop to CRA to scan them. Most of the files exceeded APP_MAX_FILE_SIZE
. I haven't observed restarts.
Is it a "plain" docker installation or you introduce some "tweaks" in docker.json
file?
from clamav-rest-api.
I think that finally I was able to reproduce your problem. Check the new docker image pushed to docker hub.
from clamav-rest-api.
Close this issue as there is no response from the reporter.
from clamav-rest-api.
Related Issues (18)
- [Question] Could I use this API to scan another pod? HOT 2
- k8s setup communication problem - ECONNREFUSED HOT 16
- Why forcing filenames to have APP_FORM_KEY name ? HOT 1
- ECONNREFUSED 127.0.0.1:3310 HOT 16
- what is host name when i use clamd-rest-api within the container.On juypter host name is localhost and its working, but when i run python code within the container its not working . Please help HOT 1
- File storage path
- [Feature] Check if the database signature its up to update in the version endpoint HOT 5
- TypeError: req.files.hasOwnProperty is not a function HOT 19
- CRA returns `"is_infected": null` HOT 6
- a few suggestions and fixes HOT 3
- "is_infected":null returned on any request, even if virus is found HOT 4
- Limited File Types HOT 3
- Open vulnerabilities for express-fileupload HOT 6
- Error when calling / HOT 3
- Testing Endpoints /version works /scan doesn't HOT 2
- Changelog available HOT 2
- Typo on the readme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clamav-rest-api.