Welcome Guest, Not a member yet? Register   Sign In
Sporadic slowness
#11

[eluser]Pascal Kriete[/eluser]
You could go into the db lib and put some benchmarking code there. But to be honest it doesn't look like CI is the culprit here, but rather the database. So you could just skip over the db library and do a simple mysql_connect() in your controller and benchmark that.
#12

[eluser]imorris[/eluser]
Thank you for your advice. We have narrowed it down to the database connection/initialization because we found that we get the same sporadic delay whether we use the CodeIgniter database class or we use the standard PHP mysql connection.

Can you offer any assistance in this regard? We've tried changing the driver to mysqli and it doesn't make a difference.
#13

[eluser]Pascal Kriete[/eluser]
I'm afraid I'm not a database admin. Are you on a shared host or is this your own db server?
#14

[eluser]imorris[/eluser]
The connection is between two of our own boxes. Both Ubuntu.
#15

[eluser]InsiteFX[/eluser]
Do a search on MySQL log query results.

InsiteFX
#16

[eluser]Sire[/eluser]
One suggestion might be to try "skip-name-resolve" in mysql.
#17

[eluser]InsiteFX[/eluser]
Try adding these to your MySQL mysql/bin/my.ini

Code:
[mysqld]
#interactive_timeout=180
set-variable = interactive_timeout=100

# Reduced wait_timeout to prevent idle clients holding connections.
set-variable = wait_timeout=30

#thread_cache=128
# Reduced it to 32 to prevent memory hogging. Also, see notes below.
set-variable = thread_cache=32

InsiteFX
#18

[eluser]imorris[/eluser]
Thank you for the suggestion, Sire. I think we are going to move the database to a different server. For example, I don't have any issues when I moved the DB to my own computer.

Also, I tried the -names-resolve option and it didn't make a difference.

Thank you all for your help.




Theme © iAndrew 2016 - Forum software by © MyBB