Autoblogged MySQL question

Discussion in 'Blogging' started by amsterdamned, Feb 2, 2010.

  1. amsterdamned

    amsterdamned Regular Member

    Joined:
    Oct 13, 2009
    Messages:
    216
    Likes Received:
    46
    Hey,

    I was wondering if someone knows what the heck my host is talking about.

    Today my (rather large package) but shared hosting account got disabled due to autoblogged. (Yes I know I should be on a VPS) but the host said something interesting:

    The script could run very well (even on shared hosting) if it would only add "mysql_close" and change "mysql_pconnect" naar "mysql_connect".

    Anyone run into this or know where to change this?

    Thanks!
     
  2. happyhatter

    happyhatter Registered Member

    Joined:
    Jan 26, 2009
    Messages:
    61
    Likes Received:
    3
    Sounds like they are complaining that you have too many open database connections.

    Do a search in your script for mysql_pconnect and change it to mysql_connect so you can use mysql_close to close your database connection.
     
  3. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    975
    Likes Received:
    682
    Occupation:
    Web/Bot Developer
    What shared hosting are you using?
     
  4. funktrust

    funktrust Regular Member

    Joined:
    Apr 3, 2009
    Messages:
    208
    Likes Received:
    54
    Occupation:
    Cisco Engineer
    Location:
    Sydney
    Don't waste your time and money on a VPS, do what I did, setup 25blogs per reseller account, there reseller servers have around 16cores, compared to the 2 core VPS. I was getting nothing but problems with my VPS, so I migrated all my sites across resellers.
     
  5. theleanhorse

    theleanhorse Junior Member

    Joined:
    Sep 19, 2009
    Messages:
    124
    Likes Received:
    21
    What software are you using to run your blogs? If you're using Wordpress I can't imagine that Wordpress is using the persistent connection and not closing them appropriately.
     
  6. cozmic_

    cozmic_ Newbie

    Joined:
    Oct 2, 2010
    Messages:
    15
    Likes Received:
    1
    I am in trouble with same problem. Autobogged kill my 3gb 2 core server (runnig only 2 websites) . I don't know why it sometimes consume all of the ram and swap of the server. It opens lots of mysql socks instantly and kills the server in 5 minutes. Did you fiugure out this problem ? Any suggestion?
     
  7. Scripteen

    Scripteen Elite Member

    Joined:
    Sep 19, 2009
    Messages:
    1,810
    Likes Received:
    1,919
    Home Page:
    Just change change "mysql_pconnect" to "mysql_connect" in all the script files and forget about mysql_close() as this might be tricky to add to all script files.

    From http://www.php.net/manual/en/function.mysql-close.php
     
  8. SpiderWebMaster

    SpiderWebMaster Power Member

    Joined:
    Jan 24, 2009
    Messages:
    628
    Likes Received:
    526
    Occupation:
    I don't have a job...
    Location:
    /dev/null

    You need a sysadmin to optimize your server. I run dozens of sites using autoblogged in servers with the same specs as yours and never got a problem. VPS's on the other hand would get killed, the same with reseller accounts.