-------- Original-Nachricht --------
> Datum: Fri, 24 Jul 2009 19:26:03 +0200
> Von: Julien Valroff <[email protected]>
> An: [email protected]
> Betreff: Re: [Dspam-devel] "unable to initialize tools context" error

> Le vendredi 24 juillet 2009 à 19:17 +0200, Steve a écrit :
> > > Here it is:
> > >
> > And DSPAM version is?
> 
> Sorry,
>
No need to be sorry.


> it is a 3.9.0 GIT snapshot dated of 14/07
> 
Okay. First of all add/replace the MySQL config part in that other file to be:
------
MySQLServer.net                 localhost
MySQLPort.net                   3306
MySQLUser.net                   *****
MySQLPass.net                   **********
MySQLDb.net                     dspam
MySQLCompress.net               true
MySQLUIDInSignature.net         on
MySQLReconnect.net              true

MySQLServer.sock                /var/run/mysqld/mysqld.sock
MySQLPort.sock                  
MySQLUser.sock                  *****
MySQLPass.sock                  **********
MySQLDb.sock                    dspam
MySQLCompress.sock              true
MySQLUIDInSignature.sock        on
MySQLReconnect.sock             true
------

What I have added is the MySQLReconnect statement (I hope you have MySQL >= 
5.0.13?) and put your configuration to be in storage profiles. One storage 
profile is called "net" (since you do here communication over network 
(localhost)) and the other is called "sock" since it talks with MySQL over a 
socket. Please correct the path to the socket if needed and look that DSPAM can 
access the socket.

Next go and change your dspam.conf and add/replace:
------
DefaultProfile                          net

Failover.net                            sock
Failover.sock                           net

FailoverAttempts                        4
------

"DefaultProfile" sets the default profile to be "net" (that's what you used 
before).

"Failover.net" sets the failover for the "net" profile to be "sock" and for 
"sock" the failover is "net".

"FailoverAttempts" is set to 4 because:
1st failover is going from "net" to "sock"
2nd failover is going from "sock" back to "net"
3th failover is going from "net" again to "sock"
4th failover is going from "sock" back to "net"
5th failover wont happen since we don't allow more then 4 failovers.

That should give each profile two times the possibility to reconnect to the 
storage engine. Beside that the MySQLReconnect statement will instruct MySQL 
(not the server but the MySQL library) to try to reconnect in case the 
connection is lost. So you have dual assurance when loosing the connection to 
the storage backend (that's your initial problem). The MySQLReconnect one is 
done internally in MySQL and DSPAM will not realize that MySQL reconnected and 
the other one with storage profiles is a hard one where DSPAM 
reconnects/reinitializes the whole storage engine again.

Let me know if that helped for your problem?


> Cheers,
> Julien
> 
Steve

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

------------------------------------------------------------------------------
_______________________________________________
Dspam-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to