FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Slow posting
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Slow posting [message #36754 is a reply to message #34816] Fri, 06 April 2007 16:30 Go to previous messageGo to previous message
angryowl   United States
Messages: 7
Registered: October 2006
Karma:
Junior Member
Nope, it's not FUDForum at all.

My install of FUDforum had this problem too. Posts were taking FOREVER (like minutes, literally) and sometimes timing out. Our forum is frequented by about two dozen people, and many of them are subscribers to topics and forums so email notifications are a huge part of why we like FUDforum.

But these slow posts, it was making us insane. We tried all sorts of tricks to speed things up... thinking that it had something to do with the install, the config of the host machine, and so forth.

Then, in an act of desperation, I started climbing around through the FUDforum code looking for some way (ANY way) to speed up posts. Our best working theory was that the email notifications were slow. So I popped open iemail.inc.t in the FUDforum source and found the line where FUDforum calls the PHP function "mail()" in a loop to send out the notifications.

Thanks to a bit of astute undertanding on the part of a man named Vikas Jayna, we discovered that mail() was calling sendmail() on our host machine, and the Hosting Service that owned the machine had a rate limiter/anti-spam delay on sendmail to prevent drive-by spammers from setting up shop on their servers. There was an enforced transaction delay per mail() call. Since we were calling mail() in a loop for up to 24 users, this was taking a long long time.

The fix is to send mail deferred. You MAY be only able to do this if your host is using sendmail, I don't know. But here's the magic spell:

from PHP documentation:

bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )


Quote:


I think passing the following string "-O DeliveryMode=d" in the $additonal_parameters variable would do the job

Vikas Jayna



In the fudforum source, in iemail.inc.t, I added the "-O DeliveryMode=d" as the last parameter of the mail command here:

        foreach ((array)$to as $email) {
                $mail_func($email, $subj, $body, $header, "-O DeliveryMode=d" );
        }


And OH MY GOD is it FAST when posting messages now!

If you're experiencing the same issues I had (rate limited ISP/Hosting provider) this will be your magic beans.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2.7.6: Link to "new in topic" from topic list often only shows first post...
Next Topic: forum rank system - inconsistent rank display
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Sep 29 03:25:09 GMT 2024

Total time taken to generate the page: 0.04497 seconds