-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Hi,
We meet an issue that turbo will occupy memory up to three times of upload file size during the request.
If we need to upload file with size 60MB, it will use memory up to 180MB. It would cause out of memory in the embedded system with limited memory.
After tracing code, the memory use as below:
one is buffer enlarged in the iostream.IOStream:_read_to_buffer() calling self._read_buffer:append_right()
one is convert ffi.string to lua string in iostream.IOStream:_consume() as request.body
one is string slice argument[1] = data:sub(v1, b2) during parsing multipart httputil.parse_multipart_data()
In our scenario we need to save the file in the handler, it would cost one more time of memory.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels