OTRS Performance - Slow email degrades other functions response times

Moderator: crythias

Post Reply
bitos
Znuny newbie
Posts: 34
Joined: 27 Nov 2013, 17:27
Znuny Version: 3.2.7

OTRS Performance - Slow email degrades other functions response times

Post by bitos »

Hi Guys,

I recently rebuilt our OTRS server, moved it to the DMZ and restored the Application and DB onto the new server.

Since then, creating tickets got a lot slower.

For example:
Tickets that are being created using the customer portal now take exactly 19 seconds each to create.
Creating a ticket as an agent takes 5 seconds every time.

My guess is that the emails that are being sent while doing so, are causing the delay.
I think every e-mail accounts for a ~5 second delay

When I create a ticket as an agent, an automatic response gets sent to the customer. So 1 email is being sent out. Hence the 5 second delay.
When a customer creates a ticket, all 3 agents get an email, and the customer gets an automatic response too. So 4 emails, hence the ~20 second delay.

If I turn off the automatic response belonging to a queue, and I create a ticket as a customer, the delay drops from 19 to 14 seconds.

Server OS: CentOS 6.8 minimal
Architecture: 64-bit
MySQL: 5.1.73
Apache: 2.2.15
OTRS 3.3.3

SendMailModule: SMTP
Port: 25

I already tried:
- Resetting everything back to default in Admin -> SysConfig -> Ticket -> Frontend::Customer::Ticket::ViewNew
- Disabling CheckMX
- Setting NotificationSenderEmail to the same value as SendmailEnvelopeFrom and SendmailNotificationEnvelopeFrom
- Temporarily disabled iptables
- checked /etc/resolv.conf - it has the correct DNS server

I actually have no idea on where I should begin to look in hopes of regaining performance.
Any thoughts? Thanks!
OTRS 3.3.3 on Cent0S 6.5 using MySQL.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS Performance - Slow email degrades other functions response times

Post by jojo »

switch to
SendMailModule: sendmail
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
bitos
Znuny newbie
Posts: 34
Joined: 27 Nov 2013, 17:27
Znuny Version: 3.2.7

Re: OTRS Performance - Slow email degrades other functions response times

Post by bitos »

Why should I switch to sendmail? We had lots of problems with sendmail before and I'd like to keep using our internal mail server.

I need to figure out where this delay is coming from.
Do you have any suggestions?
I tried turning on debugging for the SMTP module, but in the apache log, it just shows me the email that was composed.
OTRS 3.3.3 on Cent0S 6.5 using MySQL.
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: OTRS Performance - Slow email degrades other functions response times

Post by EXG133 »

Because by using 'Sendmail' you are sending your mails to the MTA on your server, which means OTRS can have (close to) instantaneous mail sending.

I would not recommend actually using sendmail of course, exim or postfix which provide sendmail commands are a lot more straightforward to implement.

If you use SMTP module your OTRS will open a connection to the remote MTA and wait for a response, exactly like you're experiencing now. On top of that OTRS doesn't handle several normal SMTP events like queueing gracefully.

You could enable debugging in the SMTP perl file and compare that to the logs on your mailserver. Perhaps get a reason why your current connection is slower than before.. but SMTP will always be slower than Sendmail.
bitos
Znuny newbie
Posts: 34
Joined: 27 Nov 2013, 17:27
Znuny Version: 3.2.7

Re: OTRS Performance - Slow email degrades other functions response times

Post by bitos »

I tried moving the server back into the LAN, but that did not resolve the issue, nor did changing the host name of the server.

I configured postfix on my OTRS server to relay to our internal mail server and set the SMTP server in OTRS to "localhost". E-mail now gets delivered instantly and the application responds in a timely fashion again.

I'm just going to leave it like this since i've already invested too much time into it.

Thanks all for the help!
OTRS 3.3.3 on Cent0S 6.5 using MySQL.
Post Reply