Somebody suggested that I create the cron job as a php scripts, so I
did:
include("dbinfo.inc.php");
$connect = MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable
to connect to the database");
@mysql_select_db( "$dbName") or die( "Unable to select database");
$insert = "INSERT INTO sysklog2
(machine,facility,priority,logdate,logtime,message) SELECT machine,
facility, priority, cast(left(date1,8) as date) as logdate,
cast(right(date1,6) as time) as logtime, message FROM sysklog;";
$query = mysql_query($insert);
$delete = "DELETE from sysklog;";
$query = mysql_query($delete);
mysql_close($connect);
I am still having the same issue, when the above script runs every
minute memory usage increases by 200-500k and doesn't release itself.
Any ideas/suggestions?
Thanks!
-----Original Message-----
From: Jason Linden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: MySQL/Cron problem
Tried it... didn't do anything. Also, there are 11 different instances
of mysql running. Any ideas why? Or is that just how it works?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:37 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: MySQL/Cron problem
Hmmm, have you tried putting is a folling mysqladmin flush-threads
command?
-----Original Message-----
From: Jason Linden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:57 AM
To: [EMAIL PROTECTED]
Subject: MySQL/Cron problem
I am fairly new to both linux and mysql. I have a cron job that runs
every minute to move data from one mysql table to another (both tables
are in the same database), see below:
Cron job is:
mysql -u *** --password=*** syslog < /var/scripts/updsysklog2
Script is:
INSERT INTO sysklog2 (machine,facility,priority,logdate,logtime,message)
SELECT machine, facility, priority, cast(left(date1,8) as date) as
logdate, cast(right(date1,6) as time) as logtime, message FROM sysklog;
DELETE FROM sysklog;
The problem I am having is every time this runs it adds ~250k to memory
and doesn't release it then server locks up every 5 or 6 days.
Any ideas on how to fix this?
Thanks!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]