Using mySQL database in different server

Started by ai_yazawa, April 21, 2009, 01:40:25 PM

Previous topic - Next topic

ai_yazawa

i've been getting the error message "MySQL has gone away" lately, mostly when i tried to post large-sized topic or mass-email to the forum members. i've checked the wait_timeout and it's set to 20.

i tried talking to the hosting provider bout this and they blame SMF instead, saying it's a common issue with SMF. they refuse to increase the wait_timeout value.

i still have another half a year to go with this provider, FYI.

so, i'm kinda wondering if it's possible if i made a copy of the database and import it to another server. and instead of connecting to the database from the localhost, can i link my forum to the database on that other server instead.

thanx for ur assistance!

青山 素子

Quote from: ai_yazawa on April 21, 2009, 01:40:25 PM
i tried talking to the hosting provider bout this and they blame SMF instead, saying it's a common issue with SMF. they refuse to increase the wait_timeout value.

While it is a common issue with SMF, you'll find that it's a huge issue with really poor quality hosts. It is especially a huge issue with GoDaddy. Actually, there are few hosts outside them in particular that I've seen as having this problem. Heck, even with 1&1 (an awful host in my opinon - I manage an SMF forum that is hosted with them), I haven't seen this issue.

Note that since SMF does some other things including DNS reverse lookups while the MySQL connection is open, a really bad DNS server can cause this issue. You can try disabling lookups and see if that helps.


Quote from: ai_yazawa on April 21, 2009, 01:40:25 PM
so, i'm kinda wondering if it's possible if i made a copy of the database and import it to another server. and instead of connecting to the database from the localhost, can i link my forum to the database on that other server instead.

Only if the owner of that server allows MySQL connections from your web server. Most of the time, MySQL connections are blocked from anywhere except the host the server is with.

This might not be a good solution, however, as the extra time it takes to contact the outside server might cause large slowdowns of page generation or even further problems.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Blind Bandit

Quote from: ai_yazawa on April 21, 2009, 01:40:25 PM
i've been getting the error message "MySQL has gone away" lately, mostly when i tried to post large-sized topic or mass-email to the forum members. i've checked the wait_timeout and it's set to 20.

i tried talking to the hosting provider bout this and they blame SMF instead, saying it's a common issue with SMF. they refuse to increase the wait_timeout value.

i still have another half a year to go with this provider, FYI.

so, i'm kinda wondering if it's possible if i made a copy of the database and import it to another server. and instead of connecting to the database from the localhost, can i link my forum to the database on that other server instead.

thanx for ur assistance!

Why not simply find a new host?

ai_yazawa

#3
Quote from: Motoko-chan on April 21, 2009, 07:16:33 PM
Note that since SMF does some other things including DNS reverse lookups while the MySQL connection is open, a really bad DNS server can cause this issue. You can try disabling lookups and see if that helps.

How exactly can i disable this lookups?

Quote from: Motoko-chan on April 21, 2009, 07:16:33 PM
Only if the owner of that server allows MySQL connections from your web server. Most of the time, MySQL connections are blocked from anywhere except the host the server is with.

This might not be a good solution, however, as the extra time it takes to contact the outside server might cause large slowdowns of page generation or even further problems.

urgh.. i guess it's not a good idea then.. =_=

Quote from: Blind Bandit on April 21, 2009, 08:59:34 PM
Why not simply find a new host?

coz as i said, i have another 6months with them. i've paid them for a one year service.

i do have plan to find a new host. it's just that i wanted to know if there's any way that i can utilize that one-year subscription until the end before i change to a new host. i don't have any other problem with them, just this mySQL problem.

Tiribulus

Quote from: ai_yazawa on April 21, 2009, 11:36:05 PM
<<< How exactly can i disable this lookups? >>>

In 1.1.8 it's in features and options/layout and options.

in 2 it's configuration/server settings/general

Advertisement: