sendmail slows down webpage / where to start troubleshooting?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sendmail slows down webpage / where to start troubleshooting?
Hi everyone.
Here's the setup. I have a website that has a php script that mails the user a email confirmation.
It's a pretty robust system, 3.0 ghz, 2gig of ram, lots of hard disk space, with centOS. So I don't think the issue is slow hardware.
For the php script, it pretty much waits until the entire sendmail process completes. Once it does that, it goes on normally. It's only during mailing, does the server slow up.
I'm really interested in figuring out how to go about troubleshooting this as I have never really had this problem before. Even my crappy home computers send mail out much faster then this.
Some general guesses - reverse dns? misconfiguration? I really have no idea.
Thanks for any help.
Last edited by neocontrol; 05-06-2010 at 01:29 PM.
try sending a mail through your sendmail server directly and see how it acts. Also, check your sendmail logs for anything that looks out of the ordinary. chances are that it's having problems sending mail out to the world.
Okay, here's the output that I'm getting in /var/log/maillog when i send a message using the "mail" program.
Also the entire sendmail setup is EXACTLY the same as my production server which sends mail instantly. It also only spits out to lines of output to the log files unlike this one.
Other things that may be helpful. My production server is set to a static IP which has reverse dns setup on it.
This beta server it on a dsl line, with no reverse dns, but it does have a forward dns entry.
This is interesting. It looks like you have two sendmail processes running, interacting with one another to send an email.
this is the chain of events from the above log:
1) mail composed, sent to sendmail process 1
2) process 1 attempts to relay through process 2
3) after 20 seconds, process 2 tries to auth the connetion and fails
4) after 1:04, process 2 accepts the mail in spite of auth failure
5) process 1 logs that the mail has been delivered to process 2
6) process 2 determines the proper mailhost and (apparently) attempts to send after an indeterminate amount of time
7) after a total of 1:22 since step 5, process 2 logs that the mail has been delivered to the remote host.
Now, we don't know exactly how much of the mysterious 1:22 elapsed waiting on google... but we can assume that it's not much since it's google. We cannot assume, however, that the local network or system did not cause the bottleneck. It might also be related to DNS lookup delays... although that wouldn't explain the first delay.
What kind of load averages have you been experiencing? your system might be bogged down in spite of the beefy hardware. Sendmail is taking a long time to deliver these messages for a reason that isn't readily apparent from these logs. More info, please :P
Does this happen with other mail servers you try and send to? The reason I ask is because some mail servers will throttle your connection if you do not meet certain requirements. Another possibility would be (although not likely) is that your DNS server is responding very slowly.
Does this delay still exist when you send mail to another domain on localhost? If it doesn't I would try and send mail from your test server to your production server so that you have control of both sides. If worst comes to worst telnet into port 25 on localhost and send a piece of mail first to your production server then to gmail to see after which command the connection is delayed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.