Results 1 to 10 of 10
Thread: shared server email resources
-
07-26-2005, 03:51 PM #1Newbie
- Join Date
- Jul 2005
- Location
- fremont, CA
- Posts
- 8
shared server email resources
Hi i hope someone will be able to help me with this problem i'm having with my web host (OLM.net).
I've had really really bad service with this provider. We're on a shared hosting account and we do not reach anywhere near our hosting capacities. However, our site goes down quite frequently. We've moved around to 3 different servers and we get the same service. On the first 2 machines they said that it was merely "bad luck". I find this reason highly skeptical. I've pleaded with them to give me an answer as to why the servers keep crashing and if its ME thats doing the crashing. They told me that nothing points them to me as the culprit. Yet our servers still goes down.
The most recent time our server went down, i was on the phone with them trying to draw our some information about why it crashed and giving them some areas i thought might be crashing the server (jobs i run on the server). I have a cron job that sends emails using MIME::Lite and sends emails from our db. It sends a max of 100 emails every hour. From what i know, this is very minimal. I told the tech rep that this is the only thing i could think of that could cause the server to crash because it runs periodically and in the background. The rest of my site is php scripts that do mysql queries and render html, nothing extravagant at all.
I got an email back from the tech admin about 30mins later (after telling him that i was going to speak with his business manager) saying that my cron job was indeed the culprit. He said that his admin told him that i would need a dedicated server with 1gig of ram to run such a script. Can you tell me that this is necessary to send 100 (98% of which are text) emails every hour? I'm not an expert sys admin, but i find this to be BS.
If anyone can shed some light on this i would be very greatful. Also, if someone can recommend a VPS that has great service and reliability that would be awesome. I hear good things about servint, liquidweb, and powervps, but i dont know which to choose.
Thanks in advance.
-
07-26-2005, 05:35 PM #2Newbie
- Join Date
- Jul 2005
- Posts
- 5
hello,
bad luck can happend, but in that case it's realy very bad luck.
Facts :
1) your website went down with 3 different servers.
2) there is nothing but a simple background script that run in background.
So, all of that let me think the following :
1) Or your webhost got really important problems with the hardware (that is possibe, but in that case the webhost would have comunicate on it)
2) Or there is a technical problem with your script:
a)You use MIME::lite, but if the rest of your site is in php , why not use directly MAIL()? At least it will avoid some CPU Cycles?
b) How MIME:: was implemented? Does you installed it yourself, or does the webhost did it? In case of Unix (linux, freebsd...) how was the compilation?
c) the mails .... What is the avarage size of one mail? What is the maximum size ?
d) Do you use Sendmail? If not, wich program handle the mails?
c) When sneding an email in background, what account is using by MIME::???? If MIME use one of the following accounts:
ROOT
GUEST
ADMIN
NOBODY
... (the list depend of the OS used by the webhost)
then the problem is here, according the various online documentions related to Sendmail or any other MTA, the corresponding RFC, and the Linux Man pages related to the emails sending; the ability to send emails with one of the following accounts is DANGEROUS, and it's impossible to do it with many configurations.
So if MIME is logged as Root (exemple) and try to send 100 emails, it will simply keep trying until it reach a time out, if there is 100 request on the same time, yes it can put down a server.
The config file will certainly help to find out if the problem is located here, but I am supposing that is.
Whatever my advice is to NOT use MIME, but simply the php function MAIL () (maybe with a basic custom GUI), it will gain CPU cycles and you will be sure there is no external problem
RegardsLast edited by ebianchetti; 07-26-2005 at 05:43 PM.
-
07-26-2005, 05:53 PM #3Newbie
- Join Date
- Jul 2005
- Location
- fremont, CA
- Posts
- 8
2) Or there is a technical problem with your script:
a)You use MIME::lite, but if the rest of your site is in php , why not use directly MAIL()? At least it will avoid some CPU Cycles?
The reason i chose MIME::Lite is because it was easy to use and to send html emails if i chose to. The script is my version of an email queue processor, taking emails from my db and shooting them out. Also, i didnt want php to timeout in the event that sendmail stalled or something and not all my emails get sent.
b) How MIME:: was implemented? Does you installed it yourself, or does the webhost did it? In case of Unix (linux, freebsd...) how was the compilation?
The host installed it for me.
c) the mails .... What is the avarage size of one mail? What is the maximum size ?
I'm not sure of the actual size of the emails sent, but they are all text and no more then a page (< 100k i would assume).
d) Do you use Sendmail? If not, wich program handle the mails?
Yes, MIME::Lite uses sendmail to send the emails.
c) When sneding an email in background, what account is using by MIME::???? If MIME use one of the following accounts:
ROOT
GUEST
ADMIN
The script is run in the background and i'm not sure how to check the account used to run the script. I dont think it is any of these. I can run the script from my web browser manually (its just a cgi script) so i would assume its run with the same account as php.
then the problem is here, according the various online documentions related to Sendmail or any other MTA, the corresponding RFC, and the Linux Man pages related to the emails sending; the ability to send emails with one of the following accounts is DANGEROUS, and it's impossible to do it with many configurations.
So if MIME is logged as Root (exemple) and try to send 100 emails, it will simply keep trying until it reach a time out, if there is 100 request on the same time, yes it can put down a server.
The config file will certainly help to find out if the problem is located here, but I am supposing that is.
Whatever my advice is to NOT use MIME, but simply the php function MAIL () (maybe with a basic custom GUI), it will gain CPU cycles and you will be sure there is no external problem
-
07-26-2005, 06:49 PM #4Web Hosting Master
- Join Date
- Jan 2002
- Posts
- 1,400
Mailing scripts can take the server down. We have faced many down time when a client sendout newsletter from our server.
-
07-26-2005, 06:57 PM #5Newbie
- Join Date
- Jul 2005
- Location
- fremont, CA
- Posts
- 8
whats the best way to send emails to a list of people that includes getting information from a database?
I'm not too knowledgable of sendmail and its resource usages nor how it can take a server down. If you could point me to some information about how i can get this done without killing my server i would appreciate it. I'm always looking to learn.
This script needs to run periodically because events trigger emails to be sent to customers. The reason i need to run it in the background is because of the periodic nature and i'd rather not have users on my site notice slowness because the php script is sending emails.
Thanks.
-
07-26-2005, 08:40 PM #6I'm Back!
- Join Date
- Jan 2003
- Location
- Orlando FL
- Posts
- 1,342
I think like Eric said is correct, a simple script should not make a server to go down, unless ofcourse the server doesn't have good resources.
Your are only sending 100 emails an hour that means no more than 2 emails per minute. Run your script using the mail() function and don't send all emails at the same time, send one by one, sending 100 emails all at once can take some resources from the server.
Yes some newsletters software can make the server to overload, but if you send 1000 emails an hour. 100 is really not that much.
-
07-26-2005, 08:48 PM #7Newbie
- Join Date
- Jul 2005
- Location
- fremont, CA
- Posts
- 8
i'm not sending the emails all at once. I have a loop that contructs 1 email and sends it every iteration and it loops 100 times.
I really dont think this should kill a server.
Also, just want to put my web host on blast: I've called over 15 times with an answer to why my server is going down and i have yet to get an answer. The host is OLM.net and i would stay away. I'm leaving as soon as possible.
-
07-26-2005, 09:01 PM #8I'm Back!
- Join Date
- Jan 2003
- Location
- Orlando FL
- Posts
- 1,342
Well if your script is right maybe the problem is the server.
Good luck with your new host.
--- and please do not spam --- (in case that is what you are doing)
-
07-26-2005, 09:07 PM #9Newbie
- Join Date
- Jul 2005
- Location
- fremont, CA
- Posts
- 8
from what i can tell, i dont believe its my script. Unless there are some sendmail issues i dont know about.
And, i hate spam with a passion, and we're not a spamming company.
-
07-28-2005, 08:17 AM #10Disabled
- Join Date
- Dec 2003
- Location
- Trumbull, CT
- Posts
- 58
I've had really really bad service with this provider.