2 Replies - 349 Views - Last Post: 28 July 2013 - 12:44 AM

#1 tieugiang94  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 160
  • Joined: 07-December 11

Should we use Persistent Connections ?

Posted 27 July 2013 - 09:52 PM

I'm using Code Igniter, in config files. I can enable/disable Persistent Connections.
So, should we use Persistent Connections ?
Is This A Good Question/Topic? 0
  • +

Replies To: Should we use Persistent Connections ?

#2 nandureddy  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 129
  • Joined: 31-January 11

Re: Should we use Persistent Connections ?

Posted 27 July 2013 - 10:55 PM

It depends.
Advantages : Wikipedia link.
Turning it ON can cause database connection limits to exceed.
Refer to persistent-connections.

This post has been edited by nandureddy: 27 July 2013 - 10:58 PM

Was This Post Helpful? 0
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3730
  • View blog
  • Posts: 6,017
  • Joined: 08-June 10

Re: Should we use Persistent Connections ?

Posted 28 July 2013 - 12:44 AM

nandureddy, those two links reference to two entirely different problems: persistent HTTP connections and persistent database connections. In this context I'm guessing it's the latter that's going to be useful.

As far as database connections goes, whether or not to use persistent connections, and how to set it up, can be a complex issue. You will definitely have to tweak some database configurations to get that to work efficiently, and to avoid it causing problems in your code. If it's not carefully considered before hand, it's likely to cause problems and possibly even decrease performance, if not right now then when/if the traffic increases. - If you are unfamiliar with the concept, leave it off until you've studied it.

As for HTTP connections (the Keep-Alive header), it really should be used in most circumstances, and most HTTP servers do have it enabled by default. I very much doubt CI even has a config option that deals with this; it's not typically something that is dealt with on that level. It's more of a sever admin issue than an application issue.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1