Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - Database connections?
  FAQ FAQ  Forum Search   Register Register  Login Login

Database connections?

 Post Reply Post Reply
Author
yapadu View Drop Down
Senior Member
Senior Member


Joined: 12 May 2005
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote yapadu Quote  Post ReplyReply Direct Link To This Post Topic: Database connections?
    Posted: 02 September 2015 at 8:46pm
How many connections will a spamfilter server make to the database?

I notice it does a lot of connections at some points, like starting up.  Is there any way to put a limit, like a maximum of 50 database connections at a time?

I can implement a limit on the database level, but I don't want spamfilter to error out if its connection attempt to the database is rejected.
--------------------------------------------------------------
I am a user of SF, not an employee. Use any advice offered at your own risk.
Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4104
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2015 at 10:29pm
SpamFilter will spawn a new thread for each spam email that needs to be archived in the database. So if for example you have 50 inbound SMTP connections, and they are all for spam emails, SpamFilter will launch 50 threads to archive each email in the database.

In addition to this, if there are any *.queued files in the \SpamFilter\quarantine directory, they are emails that were queued for archival but never completed their addition to the database for any reason (database was not available, SpamFilter crashed, etc). SpamFilter processes that directory on interval () and will launch multiple threads to archive those emails in the database (one email per thread). The number of threads spawned is equal to one fourth of the limit for the maximum inbound SMTP connections. So if your limit for max inbound connections is 200, SpamFilter will use 50 threads to process the quarantine directory.

There are a handful of other processes, like checking the database for quarantined emails that need to be delivered, or to delete any old expired emails, but those are executed in a single thread.
Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
yapadu View Drop Down
Senior Member
Senior Member


Joined: 12 May 2005
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote yapadu Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2015 at 4:42am
In mysql you can set a limit on how many connections a user account can make.  I was thinking about putting  a limit on the number of connections spamfilter can make, so I can control the maximum number of connections I need to allocate in mysql.

Since each connection in the pool in mysql consumes ram I was thinking about putting a limit of something like 50. but based on your description if I had 500 inbound connections spamfilter might want to use a large number (like 500).

Hmmm....
--------------------------------------------------------------
I am a user of SF, not an employee. Use any advice offered at your own risk.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.230 seconds.