The Yes, This Big Header Banner
No stickies found.
Random Comment
Comment #1402
i had 81 bucks from an old account i had from before i moved to st kitts. :)

Problems at work with mailservers

at 14:00 - 26th, May 2009
this is something i posted on livejournal looking for help on the matter.

livejournal posting on php community
i've posted before trying to get help with this but ill give a little recap anyway.
basically we send out newsletters to clients. i'm writing the software for the actual sending of the newsletters.
the backend is php/mysql/fastcgi/iis

i have absolutely NO control over fastcgi, the admin on the server isn't willing to change any of the settings at all no matter how we ask or what we tell him.

basically this is what happens.
send to 1 email address, everything works fine
send to 10 email addresses, everything works fine
100 - great
400 - great
800 - great
>1000 - starts to fail with a fastcgi timeout

i've tried everything i can think of.
first i was sending individual emails using the mail() function. so every client was getting their own function.
that doesn't work because either the smtp gets backlogged or because it was just taking too long for individual emails to go out.

so then i tried sending all the clients at one time in the bcc field. now this works perfectly except for the fact that it takes absolutely forever for the email to be sent to some people for some reason. have no idea why.

so then i tried sending to 20, 30, or 40 people in one shot. this works great for small amounts of email address (ie <1000) but for larger amounts it timesout. but before it times out it actually sends to those people it gets to.

i thought maybe flushing what the server was doing would help but the admin simply refuses to activate the ability to flush whats happening.
i've tried increasing the time to 900 at the beginning of the script and tried resetting the time every time we send an email. neither seem to do anything and i keep getting those fastcgi timeout errors.

i've asked him to increase the time in fcgi.ini or whatever, and he simply refuses to do so.

now the admin was also the old programmer for the old system we were using here and he's "lost business" because of me. so i think it has something to do with sabotage that he doesn't want to anything.

it's at the point where i'm thinking about writing the script in asp to do the actual sends.

before i go about doing this, am i missing anything? is there something i overlooked or some way around sending out more than 1000 emails at once?

i'm at the end of my rope here and whats worse is my boss is looking at me like i'm the problem even though i never thought it was a good idea to go with this guy's server.

so far responses haven't helped as much as make me feel good. after everything, i think people here are thinking i can't do my job.

• Alex


Similar posts

Changing the location of the SWAP disk in Mac
Since I've changed my primary drive in my laptop to a solid state drive I've been terrif...
I've finally found a use for livejournal!
So after my massive use of livejournal some 4-5 odd years ago, my current 'blog' is now my...
Half Life Alyx
(media inside)

Running windows applications on your mac with
I found this today while trying to avoid booting into vmware's win 7. i need to do some ...
Installing Windows using a USB key or Externa
After two days of partitioning, formatting, editing, repartitioning, reformatting, install...

Curt Curt
News comment 1 | User comment 281 | 15:13 - 26th, May 2009

Sounds like FastCGI is the problem, here. Or at least, that it can't get enough memory to actually do the operation that you need it to.

If <1000 works, then can you have it do it in batches, somehow? It definitely sounds like you need to do this as some sort of cron job or whatever, which you obviously don't have access to.

Alex Alex
News comment 2 | User comment 4968 | 15:37 - 26th, May 2009

i'm trying to do it in batches now, but it still times out. my only options are these:
1. bcc the entire list in one shot and wait 5 hours for the emails to go out
2. put the jobs into mysql and have a browser go to a page that checks to see if there's a job pending. kinda like a cron job but doesn't rely on task scheduler since i don't have access to that. the problem with this way is that if the browser crashes, the network dies, or for whatever reason the page doesn't load, then nothing will go out.

so far it doesn't time out when i push 100 emails into a db 50 times (actually quite fast)

going to write the script to send the emails now...
will keep posted

Join the conversation

Don't have a username? Register Now
Can't remeber your login? Find Password