Re: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)
- From: "Mike Todd" <MikeTodd@xxxxxxxxxxxx>
- Date: Sun, 05 Mar 2006 07:20:10 GMT
"none"
Since mysql crashes after 5 days of running your script, I think you'd
better check its operation and see if it is causing your system to exceed
the kern.maxfiles limit. The easiest way to check on it would be to open
another terminal and issue the "mysqladmin status" command every once in a
while to see if the number of open files is continuing to grow.
You may have to use the "-p" option so that you can provide the proper
password for the mysqladmin program.
If that is the case, you may want to look into the "flush tables" option so
that you can have your script issue that command periodically to correct the
runaway file creation process.
--
Mike Todd
"none" <mikem891@xxxxxxxxxxx> wrote in message
news:1141515856.658929.307200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, I have a freebsd 4.10 server (x86) and I run a
shell script as a cron job every 15 minutes. This
scripts enter some data in the mysql database.
The server works fine for a few days, but after
5 days it crashes. I only get this error and cannot
do anything else (except rebooting)
kern.maxfiles limit exceeded by uid 500 please see tuning(7)
uid 500 is mysql, so I would like to know why
mysql is causing this error? why does it need
to open that much files? my current kern.maxfiles
is 1064, shouldn't this be enough?
What should I do this fix that?
add sysctl kern.maxfiles=4256 to /etc/rc.local?
or should I recompile the kernel with a new maxfiles
value?
Is there a way to configure mysql to open
less files?
Can my shell script be the culprit? It does something like
this:
if [ "`echo | ${mysqlbin} 2> /dev/stdout`" ]
then
echo "CREATE DATABASE ${mysqlname};" | ${mysqlpath}
--user=${mysqluser} --password=${mysqlpass}
echo "CREATE TABLE Average (Time DATETIME, AverageBar TINYTEXT,
Average FLOAT);" | ${mysqlbin}
echo "CREATE TABLE DBInfo (No TINYINT UNSIGNED, Server TINYTEXT);" |
${mysqlbin}
fi
echo "INSERT INTO Average (Time, AverageBar, Average) VALUES
('${sqltime}', LOAD_FILE('${tmpfile}.win'), '${avgtotal}');" |
${mysqlbin}
Thanks
.
- References:
- Prev by Date: Re: The Unix Haters Handbook
- Next by Date: Re: Freebsd on Pavilion laptop video issues
- Previous by thread: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)
- Next by thread: Re: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)
- Index(es):
Relevant Pages
|