Advertisement:
Advertise With Us!

Author Topic: Using mySQL database in different server  (Read 4201 times)

Offline ai_yazawa

  • Semi-Newbie
  • *
  • Posts: 22
Using mySQL database in different server
« 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!

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 16,483
  • 戦場ヶ原、蕩れ!
    • motokochan on GitHub
    • @motokochan on Twitter
    • Animeneko Network
Re: Using mySQL database in different server
« Reply #1 on: April 21, 2009, 07:16:33 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.


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

Just like... making of enemies / 負ける気しない やめるきない / You are cool but fool - Charisma.com 『HATE』

Note: I am not a member of the Simple Machines Forum project.


Blind Bandit

  • Guest
Re: Using mySQL database in different server
« Reply #2 on: April 21, 2009, 08:59:34 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?

Offline ai_yazawa

  • Semi-Newbie
  • *
  • Posts: 22
Re: Using mySQL database in different server
« Reply #3 on: April 21, 2009, 11:36:05 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?

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.. =_=

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.
« Last Edit: April 21, 2009, 11:45:12 PM by ai_yazawa »

Offline Tiribulus

  • Sr. Member
  • ****
  • Posts: 976
  • Gender: Male
Re: Using mySQL database in different server
« Reply #4 on: April 22, 2009, 11:29:25 AM »
<<< 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