|Subject:||Re: SMTP Freeze|
|Posted by:||Remy Lebeau (re…@lebeausoftware.org)|
|Date:||Thu, 3 Sep 2015|
> IdTCPServer receives strings, that are passed to the main thread with
> a IdNotify, and saved to files.
Why are you processing them in the main thread, instead of in the TIdTCPServer
thread that is receiving them, or at least in a dedicated processing thread?
Especially in a service project, you DEFINATELY should not be doing ANYTHING
in the main thread at all.
> The main thread process the strings in files at intervals, send
> confirmations using a IdTCPClient and if detect an error, send
> an email, from the main thread.
Why are you sending emails from the main thread, instead of from the TIdTCPServer
thread, or a dedicated thread?
> My problem is that the service, that has been running fine for years,
> freeze sending an email.
Not surprising. It has nothing to do with Indy itself. A service project's
main thread is not like a GUI project's main thread.
> I save the status text of the smtp server in a file, and I observe
> that allways the freeze happens after the connection to the stmp
> server is established:
That log is not helpful. Please show your TIdSMTP configuration, and the
actual SMTP commands and responses that are being transmitted. You can use
a packet sniffer, like Wireshark, or attach a TIdLog... component to the
TIdSMTP.Intercept prroperty. There is a lot of SMTP socket activity that
happens between the "Connected" and "Encoding text" states, which your log
is not reflecting.
> My question is if there is some change in Indy that can affect
> This components and produce this behaviour?
There is no change that woud account for this. And there is not enough information
provided to diagnose the real problem yet.
Remy Lebeau (Indy Team)
SMTP Freeze posted by Chus GZ on Thu, 3 Sep 2015