Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 413 Vote(s) - 3.57 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advantages / Disadvantages of pconnect option in CodeIgniter

#1
One of the parameters in the CodeIgniter database config is the following

['pconnect'] TRUE/FALSE - Whether to use a persistent connection


What do you recommend I set this to?
Is there a significant performance hit if I set it to FALSE?
What potential problems might arise from setting it to TRUE?
Reply

#2
Just look up general best practices for persistent connections. My suggestions.

* By default, DO NOT
* If you have:
* Dedicated web server and database hardware in production
* and have tuned the web server and database correctly
* and have an accurate production-like test environment
* And still think your performance problems are caused by database connection time,

CONSIDER turning it on

Persistent connections can cause

* Bugs because some connection state persisted unintentionally (this is a biggie!)
* Database connection limits to be exceeded
* Database performance to drop because of lots of ram used by the many (mostly idle) connections
* Bugs because connections have gone "stale" and the app didn't notice

But CAN

* Reduce latency on initial connection

If you think that connection latency is causing a problem, consider turning it on in your performance test system and *measuring* the impact.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through