SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist Mr. Tech's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    562
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Warning: mysql_pconnect(): Too many connections problem

    Hey there,

    I'm using PHP and MySQL and I'm gettign this error soemtimes:

    Warning: mysql_pconnect(): Too many connections

    Is there a way I can stop this? is this because so many people are wanting to connect to the database at the same time? How do these big forums (e.g: phpBB and VB) stop this from happening?

    Thanks

    Ben

  2. #2
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might need to adjust the maximum ammount of connections in my.cnf if you have access to the server - also you might want to reconsider mysql_pconnect as it uses a persistant connection

  3. #3
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Most forums don't use pconnect, that's how they get around it I would imagine they also close their connections when done for those that do. If you don't have control over the server to change the number of allowed connections you'll probably have to stick with connect.
    Chrispian H. Burks
    Nothing To Say

  4. #4
    SitePoint Evangelist Mr. Tech's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    562
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Meh... I was told last time that I needed pconnect...

    I'll change it to connect.

  5. #5
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mr. Tech
    Meh... I was told last time that I needed pconnect...

    I'll change it to connect.
    That's how it goes. Ask 10 programmers how to get something done and get 50 different answers
    Chrispian H. Burks
    Nothing To Say


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
  •