Among the parameters within the CodeIgniter database config may be the following
['pconnect'] TRUE/FALSE - Whether to use a persistent connection
Exactly what do you recommend I set this to?
It is possible to significant performance hit basically place it to FALSE?
What potential issues might arise from setting it to TRUE?
Just lookup general guidelines for persistent connections. My suggestions.
- Automatically, Don't
- For those who have:
- Devoted web server and database hardware being produced
- and also have updated the net server and database properly
- and also have a precise production-like test atmosphere
- But still think your speed and agility troubles are triggered by database connection time,
CONSIDER turning it on
Persistent connections may cause
- Bugs because some connection condition endured inadvertently (this can be a biggie!)
- Database connection limits to become exceeded
- Database performance to decrease due to plenty of ram utilized by the numerous (mostly idle) connections
- Bugs because connections go "stale" and also the application did not notice
- Reduce latency on initial connection
If you feel connection latency is leading to an issue, consider turning it on inside your performance test system and calculating the impact.