Solved

Inconsistent JavaMail Performance

Posted on 2008-10-03
7
665 Views
Last Modified: 2013-12-17
I have a Java web application using Apache & Tomcat on a Linux server with SendMail as my mail server. After years without an issue, I have suddenly experienced wide performance swings when sending out an email via my web app. From < 1 second to > 20 seconds. It is very sporadic and on some days it is consistently really slow ( > 30 seconds).  Any ideas on how/why this could happen and what can be done about it?
0
Comment
Question by:scott_m_ruby
  • 5
  • 2
7 Comments
 
LVL 26

Expert Comment

by:jar3817
ID: 22641582
What do you mail logs say is going on? Look at /var/log/maillog
0
 

Author Comment

by:scott_m_ruby
ID: 22642213
Everything looks good in the maillog. Is there anything else to check?
0
 

Author Comment

by:scott_m_ruby
ID: 22642232
The other really odd thing is that it seems like every other day it gets very slow to send an email all day. It has taken between 20-30 seconds to send every email today. When I say the logs look good, I mean that there are no errors. Is there something else in the logs that might be telling?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 26

Expert Comment

by:jar3817
ID: 22642246
I would look at the times for each entry related to one of these messages, to see perhaps at what stage of sending the mail it gets delayed. Have you checked your DNS setup? It could just be related to the time it takes to resolve the IP of the server it needs to send to. Do you run your own resolver or are you using your ISP's?
0
 

Author Comment

by:scott_m_ruby
ID: 22649672
I have added some additional logging to see if I can better track the delay, as you suggest. We don't run our own resolver.
0
 

Author Comment

by:scott_m_ruby
ID: 22662585
My logging is indicating that after executing my send method (Java Mail API )  it may take 25 seconds to return from the method call. The entry in the maillog will typically show up about 15 seconds after the send method has completed. It matches the exact delay value indicated in the maillog.
0
 

Accepted Solution

by:
scott_m_ruby earned 0 total points
ID: 24118380
Rebooting my entire server resolved the problem.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exchange Server Problem 3 52
Email Domain Transfer 2 39
Remove / Re-Install Exchange 2013 with Exchage 2007 still active 7 42
change default ports in Postfix 1 16
Utilizing an array to gracefully append to a list of EmailAddresses
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now