Database connections? |
Post Reply |
Author | |
yapadu
Senior Member Joined: 12 May 2005 Status: Offline Points: 297 |
Post Options
Thanks(0)
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. |
|
LogSat
Admin Group Joined: 25 January 2005 Location: United States Status: Offline Points: 4104 |
Post Options
Thanks(0)
|
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.
|
|
yapadu
Senior Member Joined: 12 May 2005 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.164 seconds.