Plesk VPS Email problems

They have: 2 posts

Joined: Jun 2010

Hello,

I've been running into a few problems lately with our VPS.

We got a VPS:

Parallels Plesk version 9.5.2
OS : Linux 2.6.9-023stab051.3-smp

Talked to our provider and their tech support said that our VPS is limited to 128 processes. Whenever we send out a bulk email, i.e. to a few hundred recipients at once, SMTP (our mail server is PostFix) goes berserk and starts doing too many processes. Spoke to them again today, they said that i need to throttle my emailing.

Can someone recommend me what to do or how to set up my VPS so that it doesn't freak out and shut down our site?

Thank you in advance.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

To be honest, if you are sending out that type of a load, you should probably be generating enough to either (1) have a dedicated server which is better suited to handle it, (2) pay for a more advanced VPS account that can handle it, or (3) pay to use a 3rd party service that is specifically designed for this type of activity.

Myself, I recommend #3. Then you don't have to worry about any laws/regulations for the matter, as companies that specifically do this service (reputable ones) will be up on the proper ways of doing it (providing opt out, etc) as they are not going to change loosing their business over no doing it right. Also, this removes all the load from you, and you usually can get some pretty good statistical reporting on it as well.

Sorry I can't recommend one, it has been a few years since I worked at a place that did this type of thing, and I forget the service they used.

now, if you still insist on doing it yourself, set up a cron job to run every 10 minutes or so (you'll have to play with the settings), have all the e-mails in a database. When the cron runs, have it get the top 100 records or so (again, you will need to play and find out what works good for you) and then just e-mail that group. After successful mailing, delete the record from the database. (I'd say also mark a field that it was attempted once, and then if it fails, and it was already marked as tried before, save it to another table of "undeliverables".

Now if you have 500 e-mails to send out, from when they are added to the database, it will be 50 minutes later (approx) that it will be done sending them, in only batches of 100 a time.

--Greg

They have: 2 posts

Joined: Jun 2010

I spoke to provider again, support suggested that I need to throttle emails, any idea how to do that?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Other than what I mentioned at the end, nope. If you are unsure, they should be able to explain to you what they mean by that (ie, limiting them to X emails every X minutes, or maybe X seconds in between every e-mail, etc)

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.