14 Replies Latest reply on Oct 4, 2005 9:55 AM by acoliver

    Issue JBMAIL-102

    jeff87

      I have been looking at http://jira.jboss.com/jira/browse/JBMAIL-102 and so far I haven't noticed a problem. Has this already been fixed possibly or am I looking at the wrong place?

      In StoreItemImpl, I see the line:

      md.setSize(Math.max(cOut.getCounter(), md.getSize()));


      and that seems to be where the size is stored. For me, it seems to be right. I save the e-mail as a file and the size is the size I am seeing stored and reported in my e-mail client.

        • 1. Re: Issue JBMAIL-102
          acoliver

          The problem was only as far as I could tell on output from POP...It it is working now then that is a good thing. Make sure... I thout it was like a K vs octets thing.

          • 2. Re: Issue JBMAIL-102
            jeff87

            OK. I was using the M3 code. I'll grab the latest from HEAD and try it again and see if I notice that bug there.

            • 3. Re: Issue JBMAIL-102
              acoliver

              I'm pretty sure that was with M3.... I'd go to the next one and mark it unreproducable if you can't reproduce it. However send yourself a good 10mb file first and see if it doesn't think its 100mb.

              • 4. Re: Issue JBMAIL-102
                jeff87

                With larger files, I am starting to see a difference. I attached three files that added up to 11 MB and the reported size was 15 MB. However, when I try just one 10 MB file; I get "org.jboss.mail.store.StoreException: java.lang.OutOfMemoryError: Java heap space". Anyway, I'll keep working on it and try to get a fix submitted soon.

                • 5. Re: Issue JBMAIL-102
                  acoliver

                  Well for the out of memory just increase your heap with -Xmx. Thats cause you're using hypersonic which keeps it all in memory. Maybe switch to postgresql or mysql.

                  • 6. Re: Issue JBMAIL-102
                    jeff87

                    Yep, so I was able to send that file 10,370 KB and no text in the body. It came back with a reported size of 14,211 KB.

                    • 7. Re: Issue JBMAIL-102
                      acoliver

                      I've actually had T-bird tell me I ddin't have enough room on disk (I had multiple gigs and the mail certainly wasn't that big)...

                      • 8. Re: Issue JBMAIL-102

                         

                        I was able to send that file 10,370 KB and no text in the body. It came back with a reported size of 14,211 KB.


                        Remember attachments are Base64 encoded so the size of a file and size of the same file attached to an email will be different. Base64 is not a paricularly efficient encoding. I have seen mail sizes double with certain attachments. It's the base64 encoded size that we are interested in.

                        Mike.

                        • 9. Re: Issue JBMAIL-102
                          jeff87

                          Does that size difference seem reasonable then? Maybe this isn't a problem? I'll work on getting the latest code from HEAD running and send that same file again and compare.

                          • 10. Re: Issue JBMAIL-102
                            acoliver

                            The differential I saw was a much higher order of magnitude. It is possible that it is fixed or that it was an isolated incident or something. IF it can't be replicated, it can't be replicated

                            • 11. Re: Issue JBMAIL-102

                              A JUnit could be written to test this. Use the ristretto library to connect to JBMail via POP. Do a list to get the size of the email, then run RETR and count the number of octets/bytes recieved. If the count matches the reported size then we are okay.

                              Mike.

                              • 12. Re: Issue JBMAIL-102
                                acoliver

                                Sounds like a good idea....

                                • 13. Re: Issue JBMAIL-102
                                  jeff87

                                  Sounds good. I'll work on a JUnit for that. I see in another post that we are upgrading the version of ristretto this weekend. Should I wait on this until that is checked in or will it not affect what I need to do?

                                  Jeff

                                  • 14. Re: Issue JBMAIL-102
                                    acoliver

                                    Uhh so like if upgrading ristretto is what is required to make CVS work again...I'll be doing it now... No need to wait anyhow.