go-zero
go-zero copied to clipboard
fix: fix large file upload memory problem
fix large file upload memory problem
Log: fix large file upload memory problem
Don't do it in this complicated method, if it doesn't work for large files, better write another method to do it.
Don't do it in this complicated method, if it doesn't work for large files, better write another method to do it.
The verbose parameter already exists in RestConf. Can I reuse it?When large files output logs, use the verbose parameter to control whether to copy the file stream using the new method @kevwan
Don't do it in this complicated method, if it doesn't work for large files, better write another method to do it.
The verbose parameter already exists in RestConf. Can I reuse it?When large files output logs, use the verbose parameter to control whether to copy the file stream using the new method @kevwan
I don't get your question, sorry!
Don't do it in this complicated method, if it doesn't work for large files, better write another method to do it.
The verbose parameter already exists in RestConf. Can I reuse it?When large files output logs, use the verbose parameter to control whether to copy the file stream using the new method @kevwan
I don't get your question, sorry!
add new method DupReadCloserForLargeFile
to do large files upload
When I was uploading large files, I found that when the middleware getLogHandler
processed stream files, it read all streams into bytes.Buffer, which resulted in high memory. After checking, I found that the memory applied to the heap could not be released in time. For my PR, when setting the configuration file parameter 'Verbose=true', the file stream will be stored in temporary space to solve the problem of high memory @kevwan