Opened 5 years ago
Closed 3 years ago
#1668 closed defect (fixed)
SUSIMAIL craps out when sending 20MB attachement.
Reported by: | c0re | Owned by: | zzz |
---|---|---|---|
Priority: | major | Milestone: | 0.9.33 |
Component: | apps/susimail | Version: | 0.9.22 |
Keywords: | susimail heap attachement difficult | Cc: | |
Parent Tickets: | Sensitive: | no |
Description
First time I try SUSIMAIL so I have no reference.
Error when sending empty mail with 20MB file attachement (.pdf)
Tried to include text. No difference, same result:
HTTP ERROR 500
Problem accessing /susimail/susimail. Reason:
Server Error
Caused by:
java.lang.OutOfMemoryError?: Java heap space
EOF
Subtickets
Change History (4)
comment:1 Changed 5 years ago by
Version: | → 0.9.22 |
---|
comment:2 Changed 5 years ago by
Keywords: | difficult added |
---|---|
Milestone: | undecided → eventually |
Everything is on the heap. If we have the full body, we read it from disk even if headerOnly is true in PersistentMailCache?.locked_getMail().
Mail, MailPart?, Readbuffer, and the decoders keep everything in Strings and byte[]. Both encoded and decoded versions may be in memory simultaneously. There's no input/output streams anywhere.
There is a length check (16 MB) and oom catch in PersistentMailCache?.read() but that's simplistic.
It's the legacy of a (originally) very simple webmail program that needs a lot of work.
comment:3 Changed 3 years ago by
Owner: | set to zzz |
---|---|
Status: | new → accepted |
Fixes for #2109 makes this possible to fix too.
Made additional changes to store sent attachments on disk, never in-memory, in 9f4b1a1184a0e4335f1f823739d15b920d0aa5d7 0.9.32-13
Keeping attachments out of memory on the receive side is much harder, leaving this ticket open for that.
Also, more changes coming to check max size.
comment:4 Changed 3 years ago by
Milestone: | eventually → 0.9.33 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
More max size checks in 0.9.32-14.
Changed my mind, will close this ticket for the sending side, and open new ticket #2119 for receiving side.
if there was a stack trace output, please include it here