Oracle - SMTP email leads to very high TCP Socket (KGAS) events

We have an oracle-procedure that will handle all the emails sending out from our application. This is now already running for a long time without any problems.

Now we changed from smtp-server and we encounter a lot of TCP Socket (KGAS) events.
This can lead to timeouts  and thus not sending out the email(s)

We performed an investigation and noticed that it occurs at the following statement:
            UTL_SMTP.rcpt( psMailconn, psRecipient );

Now we are adding 10, 50 or even 500 email receivers without any delay on the previous servers.

What can cause this event ?
How can we overcome this when adding the receivers ?
Is this a smtp-server issue (mailserver) or an oracle issue ?
LVL 53
DhaestAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Is this a new internal mail server, or are you connecting to an externals provided server?

The new server could have an anti-spam measures which include in some instances slow walking I.e. after a certain number of email recipients the response is delayed.  A server can also be configured to limit the number of recipients of a message.

...
0
Franck PachotOracle DBACommented:
Hi,

What is the p1 parameter for that event (from v$session_wait for example) ?
It is probably not an Oracle issue as Oracle just waits for a system call. For example, if p1=6 it is a call to wait on a socket to receive data (on linux the system call is 'poll').

But it can be anywhere else: either the mail server did not answer. Or the network has lost the reply packet. Any firewall between oracle server and smtp server ? Or tcp timeouts too low when smtp server is busy ?
You should check mail server log. And maybe trace tcp packets...

Regards,
Franck.
0
DhaestAuthor Commented:
Does the version of exchange has an impact on the smtp-protocol (that's used by Oracle) ?
We are switched from exchange 2003 to 2010 !
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

arnoldCommented:
Look at the smtp log on the exchange to see what is going on.  Make sure that on the exchange your configuration is not what limits the number of recipients.
Perform the following test:
initiate an email with a single recipient.
5,
10,
50.

while consulting the exchange logs.

Can you connect using telnet to the exchange 2010 port 25 and send a message through?
0
DhaestAuthor Commented:
Yes we can send a message through, because less than +- 150 receipients I get out (with already the mentioned event)
0
arnoldCommented:
Check the exchange configuration to make sure you are not limiting the number of recipients per message.
http://technet.microsoft.com/en-us/library/bb310760(v=exchg.141).aspx
0
DhaestAuthor Commented:
I transferred every remark to our exchange-team. I don't think that it's a limit of recipients per message.

I have done some checks:
50 first receipients - added in 35 seconds
100 reciepients - added in +- 2 minutes
150 reciepients - added in +- 4 minutes
200 reciepients - added in +- 7 minutes

Then sometimes added 250 or 300 recipeients before time out
0
arnoldCommented:
Note this suggests that there is something that delays (throttles) the response that the additional recipient was added.

Try it using a telnet session. anything in <> needs to be replaced with the appropriate information, then copy and paste the rcpt to: directive and see that after the first 50, you will see a delay between your submission of the recipient and the response that the recipient is OK.
telnet exchangeserver 25
ehlo <yourservername>
mail from: <senderemailaddress>
rcpt to: <recipientaddress>
rcpt to: <recipientaddress>

Your oracle email transmission timeout is 10 minutes?
Depending on the server on which oracle is running, consider setting up a local email server to which oracle will deliver the messages while the local mail server can be configured to route all mail to the exchange or multiple mail servers (smarthost/transport map)
0
Franck PachotOracle DBACommented:
Hi,
Did you check if the same message always fail or not ? Sometimes some firewall block depending on the content.
Regards,
Franck.
0
DhaestAuthor Commented:
We've passed this to our exchange-team... but no luck so far
0
DhaestAuthor Commented:
Finally found. It was a setting between the transport-server that was causing the timeout
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DhaestAuthor Commented:
Found at together with the exchange team
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.