Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxStreamSize #59

Open
andriy-tsvikla opened this issue Apr 18, 2022 · 3 comments
Open

MaxStreamSize #59

andriy-tsvikla opened this issue Apr 18, 2022 · 3 comments

Comments

@andriy-tsvikla
Copy link

andriy-tsvikla commented Apr 18, 2022

MaxStreamSize = 26214400; //25mb
This is from client constructor. Is there any reason for this value to exist?
Because of this value i could not process file with properly configured clamd service(windows).
After i increased it app started working with large files.

@awoehler
Copy link

My thinking was that to be able to limit the file before it unnecessarily moved further down the processing pipe.

@andriy-tsvikla
Copy link
Author

andriy-tsvikla commented Apr 23, 2022

Theoretically if you want to limit something you can limit it yourself. My issue here is that i build system from 2 components that i cant debug properly and then get this unnecessary option that blocks my request. My point that it needs to be removed if possible or maybe default value should be changed to accept any request size but in documentation this option could be specified. But its up to library creator.`

@JorgoP56746
Copy link

Is there an option to incread the MaxStreamSize?
When I try to process larger file, I get the following exception:

System.InvalidOperationException:
Could not read response: 
nClam.MaxStreamSizeExceededException: 
The maximum stream size of 26214400 bytes has been exceeded{color}.
at nClam.ClamClient.SendStreamFileChunksAsync(Stream sourceStream, Stream clamStream, CancellationToken cancellationToken)
at nClam.ClamClient.ExecuteClamCommandAsync(String command, CancellationToken cancellationToken, Func`3 additionalCommand)
at nClam.ClamClient.SendAndScanFileAsync(Stream sourceStream, CancellationToken cancellationToken)
at ClamAvScanner.Services.ClamAvService.ScanAsync(String fileName, Stream file) 

I changed the value for PCREMaxFileSize In clamd.conf , but this does not fix the issue.
Also tried to set PCMEMaxStreamSize, but it doesn't change the behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants