Jump to content

MySQL CPU Problems


Recommended Posts

Hi all,

 

We are having lots of trouble with MySQL on our server. MySQL uses all of the CPU causing to server to run really slow making it impossible to use any of the sites on our server.

We are running Windows Server 2003, IIS 6, PHP 4.3.9, MySQL 4.0.23.

 

Here is our my.ini file

 

[mysqld]

# set basedir to your installation path

basedir=D:/mysql

# set datadir to the location of your data directory

datadir=D:/mysql/data

skip-locking

set-variable = max_connections=350

set-variable = key_buffer=16M

set-variable = myisam_sort_buffer_size=64M

set-variable = join_buffer=3M

set-variable = record_buffer=3M

set-variable = sort_buffer=3M

set-variable = table_cache=1024

set-variable = thread_cache_size=128

set-variable = wait_timeout=3600

set-variable = connect_timeout=10

 

log-slow-queries = mysql_slow_query.log

[WinMySQLAdmin]

Server=D:/mysql/bin/mysqld.exe

QueryInterval=10

 

[safe_mysqld]

open-files-limit=8192

 

[myisamchk]

set-variable = key_buffer=64M

set-variable = sort_buffer=64M

set-variable = read_buffer=16M

set-variable = write_buffer=16M

 

Any Ideas would be appreciated.

 

Thanks

 

Link to comment
Share on other sites

  • 4 weeks later...

Try using mysql_connect() instead of mysql_pconnect() in your Connections subdirectory. I had this same problem and my host asked me to change it. No problems since.

 

Here's what my connection file looks like:

 

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_dbconnection = "localhost";
$database_dbconnection = "mydbconnection";
$username_dbconnection = "mydbuser";
$password_dbconnection = "mydbpassword";
$dbconnection = mysql_connect($hostname_dbconnection, $username_dbconnection, $password_dbconnection) or trigger_error(mysql_error(),E_USER_ERROR); 
?>

 

Hope this helps. Let me know if it does 'cause this is the first time I've been able to answer a question in here!

Link to comment
Share on other sites

Hi all,

 

We are having lots of trouble with MySQL on our server. MySQL uses all of the CPU causing to server to run really slow making it impossible to use any of the sites on our server.

We are running Windows Server 2003, IIS 6, PHP 4.3.9, MySQL 4.0.23.

 

Here is our my.ini file

 

[mysqld]

# set basedir to your installation path

basedir=D:/mysql

# set datadir to the location of your data directory

datadir=D:/mysql/data

skip-locking

set-variable = max_connections=350

set-variable = key_buffer=16M

set-variable = myisam_sort_buffer_size=64M

set-variable = join_buffer=3M

set-variable = record_buffer=3M

set-variable = sort_buffer=3M

set-variable = table_cache=1024

set-variable = thread_cache_size=128

set-variable = wait_timeout=3600

set-variable = connect_timeout=10

 

log-slow-queries = mysql_slow_query.log

[WinMySQLAdmin]

Server=D:/mysql/bin/mysqld.exe

QueryInterval=10

 

[safe_mysqld]

open-files-limit=8192

 

[myisamchk]

set-variable = key_buffer=64M

set-variable = sort_buffer=64M

set-variable = read_buffer=16M

set-variable = write_buffer=16M

 

Any Ideas would be appreciated.

 

Thanks

248957[/snapback]

 

Use only

mysql_connect()

 

And try to use Linux pall! ;)

 

Link to comment
Share on other sites

Hi all,

 

We are having lots of trouble with MySQL on our server. MySQL uses all of the CPU causing to server to run really slow making it impossible to use any of the sites on our server.

We are running Windows Server 2003, IIS 6, PHP 4.3.9, MySQL 4.0.23.

 

Here is our my.ini file

 

[mysqld]

# set basedir to your installation path

basedir=D:/mysql

# set datadir to the location of your data directory

datadir=D:/mysql/data

skip-locking

set-variable = max_connections=350

set-variable = key_buffer=16M

set-variable = myisam_sort_buffer_size=64M

set-variable = join_buffer=3M

set-variable = record_buffer=3M

set-variable = sort_buffer=3M

set-variable = table_cache=1024

set-variable = thread_cache_size=128

set-variable = wait_timeout=3600

set-variable = connect_timeout=10

 

log-slow-queries = mysql_slow_query.log

[WinMySQLAdmin]

Server=D:/mysql/bin/mysqld.exe

QueryInterval=10

 

[safe_mysqld]

open-files-limit=8192

 

[myisamchk]

set-variable = key_buffer=64M

set-variable = sort_buffer=64M

set-variable = read_buffer=16M

set-variable = write_buffer=16M

 

Any Ideas would be appreciated.

 

Thanks

248957[/snapback]

 

I've read smth today, on PHP installation website:

 

If you experience 100% CPU usage after some time, turn off the IIS setting Cache ISAPI Application

 

PHP 5 Installation Web

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.