Forum Moderators: phranque
Everything seems to work more or less OK except that when I do a large dB query. it actually stops the server from serving web pages to other users. The server doesn't crash, nor does it seem hugely loaded but as soon as I kill the SSH session, it comes right back.
I'm pulling my hair out about where to start to diagnose this and wonder if anyone has seen something similar? Alternatively, is there a better way of connecting to a remote mySQL db? Thanks in advance for your help.
Martin
Thanks for your help
Martin
[edited by: DaveAtIFG at 12:49 pm (utc) on May 27, 2004]
[edit reason] URL removed [/edit]
Here's the set up.
Apache server serving a majority of it's pages from a mysql database - reasonably busy with normal web-serving traffic.
My desktop PC using MySQL ODBC driver accessing same (remote) mysql database via SSH tunnel.
Connection works fine but when I try and synchronise or copy the remote database to my desktop, the server gets slower and slower and eventually reboots itself.
What I think is happening is that my ODBC driver gets exclusive access to the remote database when it's doing it's synchronise or copy and in the meantime, all the web generated mysql requests get queued up.
Because the process involves copying a large database (takes 30 minutes or so) - their is enough 'normal' mysql requests joining the queue to cause the server to reboot itself.
So, finally to the question - how can I get my ODBC driver to take it's turn with all of the other mysql requests? Alternatively, maybe I'm missing something and this isn't what's happening at all!
Use a different client. For example, the mysql.exe command line tool. It should be part of the binary distribution available at the mysql site. You generate an SQL file with INSERTS and UPDATES and you feed this into mysql.exe.
Find out about LOW_PRIORITY clause for UPDATE and INSERT.
You can't use rsync unless you shut the server down for the duration of the sync, because it directly accesses the database files instead of going thru the MySQL server daemon.
Find out about MySQL replication in Chapter 6 of the MySQL manual. I have never used it but I know it exists.
-- Hannes
Thanks for your help.
Martin