Announcement

Collapse
No announcement yet.

Persistant connection to the database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Persistant connection to the database

    What is the advantage of using persistant connections to the database?

    If I disable this, what would be the impact?

    Thanks.


    I receive the following message when posting a message while there was only 5 users online:

    ***
    Warning: MySQL Connection Failed: Too many connections in /home/sites/site30/web/forums/admin/db_mysql.php on line 40

    There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.
    Last edited by Liman Wong; Thu 26 Jul '01, 5:48am.

  • #2
    hope this helps

    http://www.php.net/manual/en/feature...onnections.php


    Persistent connections are SQL links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there's already an identical persistent connection (that remained open from earlier) - and if it exists, it uses it. If it does not exist, it creates the link. An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable).

    People who aren't thoroughly familiar with the way web servers work and distribute the load may mistake persistent connects for what they're not. In particular, they do not give you an ability to open 'user sessions' on the same SQL link, they do not give you an ability to build up a transaction efficently, and they don't do a whole lot of other things. In fact, to be extremely clear about the subject, persistent connections don't give you any functionality that wasn't possible with their non-persistent brothers
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3
      Thank you.

      It was because the overload from the server side. My hosting company just fixed this

      Comment

      Loading...
      Working...
      X