Current time: 02-09-2010, 04:08 PM Hello There, Guest! (LoginRegister)


Post Reply 
Mass Mail Trouble
06-30-2009, 05:42 AM
Post: #1
Mass Mail Trouble
I'm having trouble sending out mass mailings, when I try to make it run I get this error

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
2006 - MySQL server has gone away
Query:
UPDATE mybb_massemails SET `sentcount`='50' WHERE mid='3' LIMIT 1

Anyone know how to fix? I'm on version 1.4.5 right now
Find all posts by this user
Quote this message in a reply
06-30-2009, 07:42 AM
Post: #2
RE: Mass Mail Trouble
Contact your host. Something is wrong with their SQL server.

Joshua Mayer
MyBB Support Team
Visit this user's website Find all posts by this user
Quote this message in a reply
06-30-2009, 10:47 AM
Post: #3
RE: Mass Mail Trouble
And, please, update to 1.4.8, you're vulnerable to exploits.

My Personal Site - Twitter
MyBB Support Team
MyBB Directory, coming soon.
[Image: lqscs]
Visit this user's website Find all posts by this user
Quote this message in a reply
06-30-2009, 04:06 PM
Post: #4
RE: Mass Mail Trouble
My host said that the SQL server will only allow 18 connctions at a time then times out. But I don't think the mass mailing makes more than 18 connections does it?
Find all posts by this user
Quote this message in a reply
06-30-2009, 04:15 PM
Post: #5
RE: Mass Mail Trouble
Well you may have more connections form general visitors to your forum, 18 is a crazy low limit, do you know why it's so low??

My Personal Site - Twitter
MyBB Support Team
MyBB Directory, coming soon.
[Image: lqscs]
Visit this user's website Find all posts by this user
Quote this message in a reply
06-30-2009, 04:56 PM
Post: #6
RE: Mass Mail Trouble
I'm not sure why the limit is like that, but they're asking me what are the last changes made in my database before the error. What am I supposed to tell them that I ran the script? Where is the script located in the folders so I can point them for something to look at?
Find all posts by this user
Quote this message in a reply
06-30-2009, 05:33 PM
Post: #7
RE: Mass Mail Trouble
It's ./inc/tasks/massmail.php, but I don't think it's anything to do with the mail script itself, them knowing where the file is won't really help the situation... 18 connections is too low, I'd ask them to increase it.

My Personal Site - Twitter
MyBB Support Team
MyBB Directory, coming soon.
[Image: lqscs]
Visit this user's website Find all posts by this user
Quote this message in a reply
06-30-2009, 10:23 PM (This post was last modified: 07-01-2009 03:30 AM by 360boostr.)
Post: #8
RE: Mass Mail Trouble
I asked but they said that it has to be limited at that for other users on the server. Umm I don't know if this has to deal with this but when I did a mass PM instead of email it worked just fine, do you know why that would be because that uses the same script doesn't it?

Could it possibly be that for some reason it's looping and opening a new connection or something because it does send to at least one person (and only that one person it actually sent it to anyone in the first 50 userid's which met the group parameter)?
I decided to write a little script to try it. It can get through about 180 users before timing out
Code:
<?php
$host2 = "HOST";
$user2 = "USER";
$password2 = "PASS";
$db2 = "DATABASE";

$con2 = mysql_connect($host2,$user2,$password2);
if (!$con2)
  {
   die('Could not connect: ' . mysql_error());
  }

mysql_select_db($db2, $con2);

$submit = mysql_query("SELECT * FROM mybb_users WHERE usergroup=2");
while ($request = mysql_fetch_array($submit)){

$to = $request['email'];
$subject = 'July Newsletter';
$message = 'email ';

$header = 'From: email' . "\r\n" . 'Reply-To: email';

mail($to, $subject, $message, $header);
}

mysql_close($con2);
?>

This works better than your mass-mailing but it's horribly inconvenient for me to mail this way. I'm still talking with my host but they are super unhelpful.

Is there anyway I could integrate that into the mass mail feature so I can still run it through ACP? I'm still confused why PM mass mail works yet email doesnt.
Another thing that I noticed, I can do one to admins as a test just fine, then again there are only 2 admins, but the other mails go to 100 or 1000+ users

Would changing the limit per page down possibly work?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: