none
Reading Large Mails from Exchange 2016 using JavaMail causes socket errors RRS feed

  • Question

  • Hi,

    I have a Java application running on JRE 1.6 using JavaMail to talk to Exchange 2016.

    When a message with a large attachment is read, Exchange gets socket errors, basically exhausting open sockets.

    We think it is because the TIME_WAIT value in JavaMail is very large.

    Restarting the Java application does not fix the problem.

    Making a change on the Exchange server to the mailbox, resets the TCP/IP connections to Null,
    and the problem goes away.

    What setting in Java controls the number of open sockets in JavaMail?  Or, is there any guidance on JavaMail with Exchange 2016?

    Any advice would be welcome.

    Thanks.

    • Moved by Manu Meng Monday, June 24, 2019 8:38 AM relocate
    Friday, June 21, 2019 5:31 PM

Answers

  • Hi,

    Based on your description, your questions are as follows:

    What setting in Java controls the number of open sockets in JavaMail?  Or, is there any guidance on JavaMail with Exchange 2016?

    Since we mainly discuss Exchange server topics in this forum and your issue is more related to Exchange development side, to better resolve it, I will move the thread to Exchange Server Development forum.

    Thanks a lot for your understandings!

    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer by tballard Tuesday, February 11, 2020 8:07 PM
    Monday, June 24, 2019 8:38 AM