LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-23-2007, 10:43 AM   #1
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Rep: Reputation: 31
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.
 
Old 04-23-2007, 02:37 PM   #2
djjoshuad
Member
 
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
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.
 
Old 04-23-2007, 08:50 PM   #3
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
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.

-------------------------------------------------

Code:
Apr 23 20:12:29  sendmail[23869]: l3O1C9DW023869: from=root, size=69, class=0, nrcpts=1, msgid=<200704240112.l3O1C9DW023869@domain-name.com>, relay=root@localhost

Apr 23 20:12:29  sendmail[23870]: NOQUEUE: connect from localhost.localdomain [127.0.0.1]

Apr 23 20:12:29  sendmail[23870]: l3O1CTBf023870: Milter: no active filter

Apr 23 20:12:49  sendmail[23870]: ruleset=trust_auth, arg1=root@.domain-name.com, relay=localhost.localdomain [127.0.0.1], reject=550 5.7.1 <root@domain-name.com>... not authenticated

Apr 23 20:13:53  sendmail[23870]: l3O1CTBf023870: from=<root@>, size=410, class=0, nrcpts=1, msgid=<200704240112.l3O1C9DW023869@.domain-name.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]

Apr 23 20:13:53  sendmail[23869]: l3O1C9DW023869: to=charlie.reddington@gmail.com, ctladdr=root (0/0), delay=00:01:44, xdelay=00:01:24, mailer=relay, pri=30069, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l3O1CTBf023870 Message accepted for delivery)

Apr 23 20:15:15  sendmail[23872]: l3O1CTBf023870: to=<charlie.reddington@gmail.com>, ctladdr=<root@.domain-name.com> (0/0), delay=00:01:42, xdelay=00:01:02, mailer=esmtp, pri=120410, relay=gmail-smtp-in.l.google.com. [64.233.167.114], dsn=2.0.0, stat=Sent (OK 1177377315 a22si10208165pye)

Apr 23 20:15:15  sendmail[23872]: l3O1CTBf023870: done; delay=00:01:42, ntries=1
---------------------------------------------------

Any other ideas or insight?

Last edited by neocontrol; 12-12-2007 at 10:18 AM.
 
Old 04-23-2007, 09:12 PM   #4
djjoshuad
Member
 
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
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

Last edited by djjoshuad; 04-23-2007 at 09:14 PM.
 
Old 04-23-2007, 09:22 PM   #5
b166
Member
 
Registered: Apr 2007
Location: Ft Lauderdale, FL
Distribution: Ubuntu, RHEL, CentOS, Fedora
Posts: 33

Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Procmail / sendmail hogs all memory - system slows to a halt. mike0w Linux - Software 4 08-16-2005 06:53 AM
couldn't able to start sendmail emailssent Linux - Networking 2 02-16-2005 09:07 AM
Is it possible to start stop and restart a linux service from a webpage? psychodreams Linux - Newbie 3 04-27-2004 01:24 PM
sendmail does not start sysxi Linux - Newbie 3 01-05-2004 12:38 PM
How to start with sendmail? rlc Linux - Software 6 03-09-2003 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration