Re: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)



"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



.



Relevant Pages

  • Re: Does apache stop a script mid execution ?
    ... If the user calls a time consuming script and then stops or refreshes ... How does it relate to e.g. a script performing a large mysql query? ... 2.b) how the connection is set up. ... the server stops the script execution. ...
    (comp.lang.php)
  • Re: Does apache stop a script mid execution ?
    ... If the user calls a time consuming script and then stops or refreshes ... the way the client is implemented in the php mysql extension and 2.b) how the connection is set up. ... the server stops the script execution. ...
    (comp.lang.php)
  • Re: Cyrus IMAP with pam_mysql?
    ... FreeBSD, but if you check the startup script, all the parameters are ... Default log directories are in the default data directory, ... Makefile for mysql) They are changed in the above script prior to ... imaps auth sufficient pam_unix.so ...
    (freebsd-questions)
  • Re: MySQL to SQL
    ... basically I want to take a MySql script and load it into a SQL database. ... BIOS_RELEASE_DATE datetime default NULL, ... CUSTOM_TEXT_FIELD1 mediumtext, ...
    (microsoft.public.scripting.wsh)
  • Re: Internally generated spam - but from where?
    ... I have found the script that is responsible for this *, ... data posted to it so i cant see how they are actually breaking it but I ... How can i track down what is causing ... this single process to use up so much CPU? ...
    (comp.mail.sendmail)