Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TidSmtpServer Stops responding
#1
Hi,

I have TidSmtpServer setup and running, it runs fine for a period of time, then stops responding.  When I set the server active := True it creates 2 threads for each IP binding I have made.  Each of these IP's do for a period of time handle incomming requests as expected.  Then slowly each IP stops responding to external requests and the 2 threads created when the server was set to active appear to terminate. 

The bindings all are still set, and restarting to server (Active set to False then True) does not solve the problem.

I presume that since it is the Listener Threads that are failing we should expect to see the onListenException be fired when that occurs, however I never see this get called.
Code:
procedure TdSmtpServ.WwolSmtpServListenException(AThread: TIdListenerThread; AException: Exception);
begin
 Log(now, 0, -9, AThread.Binding.IP, AThread.Binding.PeerIP, AException.ClassName, '[' + IntToStr(TmySmtpItem(AThread.Data).Id) + '] - ' +
   AException.message + ' - WwolSmtpServListenException');
   TmySmtpItem(AThread.Data).LastEvent := 'WwolSmtpServListenException ' + AException.ClassName + ' - ' + AException.message;
end;
My bindings are created as follows
Code:
procedure TdSmtpServ.SetBoundIp(ServerId: integer);
var
 Query                 : TMyQuery;
 zConn1                : TMyConnection;
 myBinding             : TIdSocketHandle;
begin
 Query := TMyQuery.Create(nil);
 zConn1 := TMyConnection.Create(nil);
 try
   try
     dmMain.SetDBReadcomp(zConn1, Query, 'SetBoundIp');
     if not zConn1.connected then
       dmMain.ConnectToDB(zConn1, 'SetBoundIp');
     with Query do
     begin
       SQL.Text := 'SELECT idIPmanager, InternalIP, PublicIP, ReverseDnsName, ServerId, Active ' + ' FROM ipmanager ' + ' WHERE Active = True and ServerId = ' + IntToStr(ServerId)
         + ';';
       Open;
       First;
       while not Eof do
       begin
         myBinding := WwolSmtpServ.Bindings.Add;
         myBinding.Port := 25;
         myBinding.IP := Query.FieldByName('InternalIP').AsString;
         myBinding.DisplayName := Query.FieldByName('ReverseDnsName').AsString;
         Next;
       end;
     end;
   except
     on E: Exception do
     begin
       Log(now, 0, -1, 'SetBoundIp', myBinding.IP, E.ClassName, E.message + ' - ' + ' SetBoundIp');
     end;
   end;
 finally
   Query.Free;
   zConn1.Disconnect;
   zConn1.Free;
 end;
end;
And myver config is set as follows
Code:
   with WwolSmtpServ do
   begin
     ReuseSocket := rsOSDependent;
     AllowPipelining := True;
     ServerName := 'WWOL SMTP server';
     DefaultPort := 25;
     ListenQueue := 50;
     MaxConnections := 0;
     MaxMsgSize := 0;
     UseNagle := True;
     UseTLS := utNoTLSSupport;
     Intercept := nil;
     IOHandler := nil;
   end;

Any pointers on where to look would be most welcome

-Allen
Reply


Messages In This Thread
TidSmtpServer Stops responding - by bluewwol - 11-09-2018, 02:36 PM
RE: TidSmtpServer Stops responding - by bluewwol - 11-09-2018, 06:35 PM
RE: TidSmtpServer Stops responding - by rlebeau - 11-09-2018, 08:42 PM
RE: TidSmtpServer Stops responding - by bluewwol - 11-10-2018, 12:30 AM
RE: TidSmtpServer Stops responding - by rlebeau - 11-12-2018, 07:19 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)