Sublime directory Surf the web anonymous Pagerank Monitor


MySQL server has gone away

olaf
Sat 8 March 2008, 03:42 pm GMT +0100
I have some strange behavior:

I select ~750 email addresses from the database

store them in an array

send some small mail message to them

and query the database again and get this error.


I tried persistent connections but still get this error, do I need to reconnect?

olaf
Sat 8 March 2008, 03:56 pm GMT +0100
just read some artciles and maybe this setting is the problem?

I have this setting:
mysql.connect_timeout 60 60

maybe I need to raise this value for that script?

how about the auto connection feature?

my_bool reconnect = 1;
mysql_options(&mysql, MYSQL_OPT_RECONNECT, &reconnect);

Note that this script works fine woth ~500 email addresses

Thanks

Nikolas
Sat 8 March 2008, 06:26 pm GMT +0100
First of all are you sure that the server works fine when this happens? I mean when you get that error, other connections work fine?

olaf
Sat 8 March 2008, 06:54 pm GMT +0100
First of all are you sure that the server works fine when this happens? I mean when you get that error, other connections work fine?
it's only while sending these mails and only the database connection, the problem exists since the number of subscribers grows above the 550 or something

Nikolas
Sat 8 March 2008, 07:28 pm GMT +0100
Looks like a configuration problem, but anyway have you tried to create a new connection when you query? I guess it wont be a problem for an action like this.

olaf
Sat 8 March 2008, 07:36 pm GMT +0100
Looks like a configuration problem, but anyway have you tried to create a new connection when you query? I guess it wont be a problem for an action like this.
I will try that tomorrow (I post only once a day some newsletter), will say you have never this kind of problems while sending mails to all members from this forum?

Nikolas
Sun 9 March 2008, 11:13 am GMT +0100
No I never had problems with such scripts, but I always take the whole query (I mean I get all the records I need at once)

olaf
Sun 9 March 2008, 11:18 am GMT +0100
strange just run the script and added some new db connection code before the query and get again the same error...

what about this setting:
mysql.connect_timeout   60   60

Nikolas
Thu 13 March 2008, 10:30 pm GMT +0100
I am not really sure about this. Did you finally solved this prob?

olaf
Thu 13 March 2008, 10:40 pm GMT +0100
I am not really sure about this. Did you finally solved this prob?
no, will check the same script on some other server first

olaf
Tue 18 March 2008, 12:18 pm GMT +0100
strange the website is now on some other (shared) server and works fine :(

Maybe I have changed something in the Mysql settings, don't care next month I get a new server :D

btw. I think it's not an bad idea to send a daily newsletter to ~1000 email addresses via some shared hosting service lol

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional