Hi John,
Maybe consider using MyTop
(http://jeremy.zawodny.com/mysql/mytop/) to view the state of queries when
your server comes under load. It will show what your database is doing to
choke your system.
Has a table become too big to insert into quickly? Move to an
archive. Consider using MySQL heap tables to buffer hits in memory before
writing to disk. You can use a cron job to flush the heap table to disk
periodically.
Do you have another cronjob that runs at 21:00 GMT every day? Is
there a lot of contention for the disk at this time (e.g., webalizer,
locate)? Move the cronjob to a time when your server is quiet.
Just some ideas ... but I hope they help.
NIge
> Hi. We are using Apache::DBI to connect mod_perl to mysql.
>
> Suddenly (at about 21:00 GMT every day) the number of mysql processes spirals into
>chaos. From a stable 8 to 20 processes, it jumps up to 70 processes. This uses up all
>our 510MB RAM, swap-space gets used, and the system grinds to a complete halt.
>Sometimes, if all load it taken off (users stop their access), it sorts itself out,
>and mysql processes return to normal. Other times server load hits 50 and I have to
>restart mysql. This kills all its processes and the system continues happily.
>
> 1) We have no idea why this happens at that particular time. There are no crons that
>run then, and we think have a finite ammount of users accessing the system who do not
>do anything different at the time the spike happens. The site is public though, so
>perhaps spiders could be doing this? Any suggestions?
>
> 2) Does Apache create a new mysql connection/process for EVERY child apache process
>that is spawned? I assume some apache processes are spawned to handle simple
>non-database actions such as retrieving a graphic or static html file. Because we're
>using Apache::DBI, does this mean that even these little processes are creating a big
>mysql process?
>
> This is bringing us to our knees. Any help or comments, no matter how obscure, would
>be greatly appriciated!
>
> Thanks everyone,
>
> John Cameron
>
--
Nigel Hamilton
Turbo10 Metasearch Engine
email: [EMAIL PROTECTED]
tel: +44 (0) 207 987 5460
fax: +44 (0) 207 987 5468
________________________________________________________________________________
http://turbo10.com Search Deeper. Browse Faster.