Previous Thread
Next Thread
Print Thread
Rate Thread
#264371 12/11/2003 8:29 AM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I have tried to install MySQL 4.0.16 over my 3.23.58 install. The server is a Dual Xeon 2.4 with 1GB ecc regged ddr and 2 x 18,3GB SCSI harddisks, runninh win2k, IIS5.0, AcxtivePerl 5 and php 4.3.
I followed all instructions for upgrade; Shutdown and remove the mysql service and installed 4.0.16.
Since I have installed 4.0.16 I have big problems.
At inconsequent times the MySQL server becomes really slow.
What I see in the MySQL control center you can see in the attachment.
The server seems to hang on the copy to temp table. When I kill that process it works again but otherwise I can take up to 1 minute before it reponds again.
Does anyone know what might have caused this and how to solve it?
We have about 200 - 350 people visiting the boards annd I get a lot of complaints about the long waiting times.
Sometimes it works fine for an hour, but then it starts again without any obvious reason.
I tried installing 3.23.58 again, but still the same problem.

Thanks for your help,

Ron.
Attachments
101632-shithappens.jpg (0 Bytes, 27 downloads)

Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
can you email me a copy of your my.ini and /or my.cfg


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
turn off persistant connections too if its set anywhere:

Threads config.inc.php - $config['persistent'] = 0;

php.ini - mysql.allow_persistent = Off


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
my server is similer to yours here my fine tuned config:
Code
<br />log-error=c:/mysql/logs/error.log<br />bind-address=127.0.0.1<br />skip-innodb<br />basedir=C:/mysql<br />connect_timeout=10<br />datadir=C:/mysql/data<br />log-bin=c:/mysql/data/binlogs.bin<br />flush<br />key_buffer=128M<br />max_allowed_packet=16M<br />query_cache_type=1<br />query_cache_limit=1M<br />query_cache_size=8M<br />read_rnd_buffer_size=4M<br />sort_buffer_size=8M<br />thread_cache_size=1M<br />table_cache=150<br />tmp_table_size=64M<br />myisam_sort_buffer_size=8M<br />myisam-recover=BACKUP,FORCE<br />


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Thanks for the help guys.
I have turned off persistent connections in php.ini (though in threads they where off already) but I don't want to change the my.ini just yet.
Could you please mail me your my.ini (without your password off-course:-)) so I can just test it with yours?
the e-mail address is: [][email protected][/]

Thanks,

Ron

Here is my ini as it is at the moment. I have tried default ini settings as well. Makes no difference.
Code
 <br /># This will be passed to all mysql clients <br />[client] <br />port=3306 <br />#socket=MySQL <br /> <br /># Here is entries for some specific programs <br /># The following values assume you have at least 32M ram <br /> <br /># The MySQL server <br />[mysqld] <br />port=3306 <br />user=root <br />password=***************** <br />#socket=MySQL <br />skip-locking <br />set-variable	= key_buffer=256M <br />set-variable	= max_allowed_packet=1M <br />set-variable	= table_cache=256 <br />set-variable	= sort_buffer=1M <br />set-variable	= record_buffer=1M <br />set-variable	= myisam_sort_buffer_size=64M <br />set-variable	= thread_cache=8 <br /># Try number of CPU's*2 for thread_concurrency <br />set-variable	= thread_concurrency=8 <br />log-bin <br />server-id	= 1 <br /> <br /># Uncomment the following rows if you move the MySQL distribution to another <br /># location <br />#basedir = d:/mysql/ <br />#datadir = d:/mysql/data/ <br />tmpdir = c:/tmp/ <br /> <br /># Uncomment the following if you are using BDB tables <br />#set-variable	= bdb_cache_size=64M <br />#set-variable	= bdb_max_lock=100000 <br /> <br /># Uncomment the following if you are using Innobase tables <br />#innodb_data_file_path = ibdata1:1000M <br />#innodb_data_home_dir = c:\ibdata <br />#innodb_log_group_home_dir = c:\iblogs <br />#innodb_log_arch_dir = c:\iblogs <br />#set-variable = innodb_mirrored_log_groups=1 <br />#set-variable = innodb_log_files_in_group=3 <br />#set-variable = innodb_log_file_size=5M <br />#set-variable = innodb_log_buffer_size=8M <br />#innodb_flush_log_at_trx_commit=1 <br />#innodb_log_archive=0 <br />#set-variable = innodb_buffer_pool_size=16M <br />#set-variable = innodb_additional_mem_pool_size=2M <br />#set-variable = innodb_file_io_threads=4 <br />#set-variable = innodb_lock_wait_timeout=50 <br /> <br /> <br />[mysqldump] <br />quick <br />set-variable	= max_allowed_packet=16M <br /> <br />[mysql] <br />no-auto-rehash <br /># Remove the next comment character if you are not familiar with SQL <br />#safe-updates <br /> <br />[isamchk] <br />set-variable	= key_buffer=128M <br />set-variable	= sort_buffer=128M <br />set-variable	= read_buffer=2M <br />set-variable	= write_buffer=2M <br /> <br />[myisamchk] <br />set-variable	= key_buffer=128M <br />set-variable	= sort_buffer=128M <br />set-variable	= read_buffer=2M <br />set-variable	= write_buffer=2M <br /> <br />[mysqlhotcopy] <br />interactive-timeout <br /> <br />[WinMySQLadmin] <br />Server=C:/mysql/bin/mysqld-nt.exe <br />QueryInterval=10 <br /> 


Those who fail to read ask many questions:-)
Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
my ini as above try it


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Ok I just put in in c:/winnt and rebootet the server.
Now I will have to try it for a few hours to see if this helps.
In a few weeks we will be upgrading to a total RAM of 2GB.
Can you tell me what settings to change for this extra RAM?

Regards,

Ron


Those who fail to read ask many questions:-)
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
One thing I noticed in your config was this line:

set-variable = thread_concurrency=8

You said you only have a dual CPU server. Thus, you should change that value to 4.

Since you are using MySQL 4 now, you really need to add these to your mysql.ini file:

query_cache_type=1
query_cache_limit=1M
query_cache_size=8M

Those are new settings available to MYSQL4 that will help a lot.

And you say you're getting a total of 2 GB of ram? Then I would suggest maybe doubling your key_buffer size, but otherwise it should run pretty well with that setup.

palmen #264379 12/13/2003 4:28 AM
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
The Key buffer is very tunable; I would not recomend it based on installed ram size at all in fact you want this value as small as you can without impacting performance, especially on Windows servers, it needs baselining, for instance I get no real benefit raising mine above 128MB where the key read ratio today is 0.000246443


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
The ini now looks like this and I still have the same problem.

Code
#This File was made using the WinMySQLAdmin 1.4 Tool <br />#12/13/2003 12:16:08 AM <br /> <br />[WinMySQLadmin] <br />Server=C:/mysql/bin/mysqld-nt.exe <br /> <br />[mysqld] <br />log-error=c:/mysql/logs/error.log <br />basedir=c:/mysql <br />#bind-address= <br />user=root <br />password=*************** <br />skip-innodb <br />connect_timeout=10 <br />datadir=c:/mysql/data <br />language=c:/mysql/share/dutch <br />#slow query log#= <br />#tmpdir#= <br /> <br />set-variable = key_buffer=64M <br />set-variable = thread_concurrency=4 <br />set-variable = flushkey_buffer=128M <br />set-variable = max_allowed_packet=16M <br />set-variable = query_cache_type=1 <br />set-variable = query_cache_limit=1M <br />set-variable = query_cache_size=8M <br />set-variable = read_rnd_buffer_size=4M <br />set-variable = sort_buffer_size=8M <br />set-variable = thread_cache_size=1M <br />set-variable = table_cache=150 <br />set-variable = tmp_table_size=64M <br />set-variable = myisam_sort_buffer_size=8M <br />set-variable = myisam-recover=BACKUP,FORCE


The server seems to hang on the "copy to temp table".
Does anyone know what (and whatfor) exactly MySQL is doing there? Could it be this temp table is misssing and therefor no data can be copyed into it?

Regards,

Ron


Those who fail to read ask many questions:-)
Sponsored Links
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I managed to capture one of these copy to temp table queries and attached it to this post.
Please have a look at it.
Attachments
101804-copy to temp table.txt (0 Bytes, 53 downloads)


Those who fail to read ask many questions:-)
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Another thought:

indexing
virus scanning
other 3rd party app

Have you got a virus scanner if so exempt the mysql dir stop the indexing service.


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
can you use mysqlwinadmin to create a reoprt of normal operation and a report when its all going bad

also can you do a 'net stat -na >c:\netstat.txt' from the command prompt and post the files or / and email them to me [][email protected][/]


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
for a min take this out and restart mysql:

set-variable = thread_concurrency=4

has a big effect on tables


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
The indexing service is on "Manual" (not started) and the virus scanner (AVG free edition) is not active (only on request bij the e-mail server).
I will post the reports somewhat later cause the problem is not so easy to catch since the whole server drags down when it happens.


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Btw, when I tried to restart the service it wouldn't start anymore. I had to comment "flushkey_buffer=128M" out in order to be able to start it again.

This is my current config:
================================================

#This File was made using the WinMySQLAdmin 1.4 Tool
#12/13/2003 12:16:08 AM

[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
bind-address=127.0.0.1
log-error=c:/mysql/logs/error.log
skip-innodb
connect_timeout=10
log-bin=c:/mysql/data/binlogs.bin

[mysqld]
#set-variable = thread_concurrency=4
set-variable = query_cache_type=1
set-variable = query_cache_limit=1M
set-variable = query_cache_size=8M

#flushkey_buffer=128M
max_allowed_packet=16M
read_rnd_buffer_size=4M
sort_buffer_size=8M
thread_cache_size=1M
table_cache=150
tmp_table_size=64M
myisam_sort_buffer_size=8M
myisam-recover=BACKUP,FORCE


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
report "good"
Attachments
101816-report_good.txt (0 Bytes, 43 downloads)

Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
report "bad"
Attachments
101817-report_bad.txt (0 Bytes, 40 downloads)

Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Threads connected is your problem by the looks of things;

whers my net stat report


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
well, the problem is that it returns me this:
Attachments
101826-netstat.png (0 Bytes, 20 downloads)


Those who fail to read ask many questions:-)
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
sorry no space netstat -na >c:\netstst.txt


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Just mailed you the results:-)


Those who fail to read ask many questions:-)
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
That looks like a search query without a timestamp being passed to it. Do you have a custom active threads link? The search engine has changed a bit in 6.4 and if you don't use the format found in the new links for "Past 24 hours", "Past 48 hours", etc, then it's going to do a full table scan when doing the search and copy to a temp table. Essentialy it will lock the table until it's done so every other query must wait for it to be done.

I've seen this on 2 other upgrades to 6.4, both having a custom link that points to recent posts that was not updated to the new 6.4 format.


UBB.threads Developer
Sally #264394 12/13/2003 3:19 PM
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
why has this guy got so many connections? - 212.204.251.30

You definetly have too many connections in TIME_WAIT state similer to a denial of service attack, you need to make sure these registry settings are set, you will need to reboot too.

Look at my attachment rename it to .reg and run it, I am sure I havnt missed anything but PLEASE check the technet site before appling it and make sure YOU are happy with the settings.
Attachments
101841-dosprotec.txt (0 Bytes, 75 downloads)


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
BTW I think the TIME_WAIT connections is only compounding the main issue. Win2k will leave a connection like tis for 2 hours (7200000), I have mine set to 2.5 mins (150000)

heres a good technet link look at appendix A

http://www.microsoft.com/technet/treevie...ovg/tcpip2k.asp


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
212.204.251.30 is another (small) site running a phpbb on the same server (different database).
I do not have a custom link to recent posts. We do have a custon header and a custon unregisterednav.tmpl and a registerednav.tmpl. Would you mind having a closer look at my database Rick when I send you my phpmyadmin password via e-mail?
I have the feeling it must be database related. I have tried all other options with the help from Clint.
I am getting pretty desperate since all visitors are starting to complaint about the slow responce of the server.

Regards,

Ron.


Those who fail to read ask many questions:-)
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Actually looking a bit closer on that. That looks like a general search. That's one thing that we are going to need to change is the fact that right now if a user does a generic search it pretty much does scan through all rows in the post table and that can create this issue. But, this is the way .threads has been from the beginning so it shouldn't be a new issue. We probably will need to start building a search index table in an upcoming version to improve the search speed.


UBB.threads Developer
Sally #264398 12/14/2003 5:24 AM
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Ok, but that is not dragging my server down is it?


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Well I have filed a support ticket at infopop, because even with all the help I got here, the problem is not solved.
I think there is something wrong with the threads database since the other board runnng on the same server (phpbb) does not have the same problems.
I think it must be upgrade 6.3 -> 6.4 related.

Regards,

Ron


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Infopop fixed the problem yesterday:-)
It turned out to be a problem with some sort of table wich was not converted properly when upgrading to 6.4.
This resulted in the search engine to do searches thrue the entire database (270MB) and that dragged the server down.

Ron


Those who fail to read ask many questions:-)

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)