SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slightly complicated PHP question (to me anyway)

    Hey everybody - my site (imagebucks.com) has been acting up today and I think it's because of the amount of traffic we're getting. We are on a dedicated server with godaddy and we have more than enough space. However, RAM is operating at about 98% all the time, so I'm having them upgrade to 2 GB instead of 1 GB tonight.

    Now for the PHP issues... the site loads fine except sometimes it won't load things from the database (the whole forum, content.php pages, and other pages will all stop working at the same time, and then start a minute later.) It's like the database can't be reached temporarily.

    I also found that at the same time these functions stop working, my Plesk won't work either... it gives me this message:

    ERROR: PleskFatalException
    Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)
    The support at godaddy suggested turning off my persistent connections in my httpd.conf file (I think the P.C. setting can also be modified in the php.ini file).

    All in all, my question is this: Should the issue be solved by the RAM being increased so mySQL can run properly without being bogged down or do I also need to turn off my persistent connections setting?

    Any help would be greatly appreciated.

    Jordan
    Shareapic.net - Where WE pay YOU to host your images!

    Echelon Design Studio - Web design, marketing, branding

  2. #2
    SitePoint Addict RRWH's Avatar
    Join Date
    May 2005
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whenever you are running into any DB Problems, you should consider looking at how the DB is performing overall.

    Using phpmyadmin take a look at the performance of your DB and then start tuning the config file.

    I would probably be right, in guessing that there is not a my.cnf file in /etc and you are simply running with the defaults. The defaults are generally not very good on a production server.

  3. #3
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I figured out that somebody was sending insane amounts of traffic yesterday and it probably swamped my server with too many connections to the database at the same time. Do you know how I can solve this?
    Shareapic.net - Where WE pay YOU to host your images!

    Echelon Design Studio - Web design, marketing, branding

  4. #4
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    perhaps your max_connections isn't set high enough. I read somewhere that this number has to be at least 1 digit higher than apache's max connections or else something is going to get locked out.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •