On Fri, 13 Jul 2007, Marcos Laufer wrote:
> Bob , i saw what you meant me to set, it was on the daemon login
> class , i changed it with chfn to _mysql .
> Tonight i will test it again with mysqlcheck -m -A -p
> to see if i still reach the limits.
When starting a program, the login class is not changed unless
explictly overridden. Setting the default login class of a user won't
help.
You need to do what I wrote earlier: use sudo -c class user command...
-Otto
>
> Thanks for your advice!
>
> Regards,
> Marcos
>
>
> ----- Original Message -----
> From: "Bob Beck" <[EMAIL PROTECTED]>
> To: "Marcos Laufer" <[EMAIL PROTECTED]>
> Cc: "Otto Moerbeek" <[EMAIL PROTECTED]>; <[email protected]>
> Sent: Friday, July 13, 2007 1:54 PM
> Subject: Re: mysql problem
>
>
>
>
> You are setting the user, not the login class.
>
> You have made a login class _mysql in /etc/login.conf,
> but it looks like you may not have that as user _mysql's default
> login class. You need to either change user _mysql to be in the
> _mysql login class by default, (hint, chfn _mysql as root) OR,
> use the su command to start it as otto showed you.
>
> Note as well, that just setting it to use 8192 open
> files won't necessarily get you all the way there if the
> kernel doesn't have that many configured. You may also need
> to increase this if you *really* need that many:
>
> # sysctl kern.maxfiles
> kern.maxfiles=1772
>
> -Bob
>
>
> * Marcos Laufer <[EMAIL PROTECTED]> [2007-07-13 10:46]:
> > I am , and i have a simple and nice script for starting and stopping it
> > properly:
> >
> > # /usr/local/bin/my start
> >
> > cat /usr/local/bin/my
> >
> > #!/bin/sh
> > #
> > test -z "$1" -o \( "$1" != "start" -a "$1" != "stop" \) \
> > && echo "syntax: $0 [start|stop]" && exit 1
> >
> > exec /usr/local/share/mysql/mysql.server $1 > /dev/null 2>&1
> >
> > --
> > and in mysql.server it says:
> >
> > # Set some defaults
> > pid_file=
> > server_pid_file=
> > use_mysqld_safe=1
> > user=_mysql
> >
> >
> > What do you think, should i add more openfiles to mysql?
> > Regards,
> > Marcos
> >
> > ----- Original Message -----
> > From: "Otto Moerbeek" <[EMAIL PROTECTED]>
> > To: "Marcos Laufer" <[EMAIL PROTECTED]>
> > Cc: <[email protected]>
> > Sent: Friday, July 13, 2007 4:07 AM
> > Subject: Re: mysql problem
> >
> >
> > On Fri, 13 Jul 2007, Marcos Laufer wrote:
> >
> > > I did read the archives, and it helped me to find out that
> > > restarting mysql fixes it for some time, and i increased the values
> > > several times but no luck. It starts working fine
> > > for a while but then again it fails . In the end i have
> > > this config right now and the problem persists, i can
> > > reproduce the problem just by executing
> > >
> > > mysqlcheck -m -A -p
> >
> > How are yo starting mysql? You need to explicitly set the login class.
> >
> > Somthing like
> >
> > su -c mysql root /usr/local/bin/mysqld_safe ...
> >
> > -Otto
> > >
> > >
> > > --
> > > # sysctl kern.maxfiles
> > > kern.maxfiles=20000
> > > --
> > >
> > > in login.conf:
> > > _mysql:\
> > > :openfiles=8192:\
> > > :datasize=infinity:\
> > > :maxproc=infinity:\
> > > :openfiles-cur=8192:\
> > > :openfiles-max=10000:\
> > > :stacksize-cur=8M:
> > >
> > >
> > >
> > > in my.cnf:
> > >
> > > [mysqld]
> > > socket = /var/www/logs/mysql/mysql.sock
> > > old-passwords
> > > tmpdir = /var/mysql/tmp
> > > open-files-limit = 10000
> > > sql-mode = MYSQL40
> > > skip-name-resolve
> > > table_cache = 1024
> > > query_cache_size = 64M
> > > key_buffer = 64M
> > > long_query_time = 5
> > > #log-slow-queries
> > > #log-queries-not-using-indexes
> > > thread_concurrency = 2
> > > #query_cache_limit = 1M
> > > interactive_timeout=60
> > > wait_timeout=60
> > > connect_timeout=15
> > >
> > > basedir=/usr/local
> > > datadir=/var/mysql
> > >
> > > sort_buffer_size = 1M
> > > read_buffer_size = 1M
> > > read_rnd_buffer_size = 4M
> > > myisam_sort_buffer_size = 64M
> > >
> > > [mysql.server]
> > > old-passwords
> > >
> > > [mysqld_safe]
> > > open-files=8192
> > >
> > >
> > > ----
> > >
> > > Maybe i need to increase something else?
> > > Thanks!
> > >
> > >
> > > ----- Original Message -----
> > > From: "Otto Moerbeek" <[EMAIL PROTECTED]>
> > > To: "Marcos Laufer" <[EMAIL PROTECTED]>
> > > Cc: <[email protected]>
> > > Sent: Friday, July 13, 2007 3:12 AM
> > > Subject: Re: mysql problem
> > >
> > >
> > > On Fri, 13 Jul 2007, Marcos Laufer wrote:
> > >
> > > > I am having a very strange problem on a 3.9 , suddenly i can't access
> > > > any
> > > > table
> > > > on the databases. I have around 100 databases on this server and can't
> > > access
> > > > not even one. This is a production server and i am in an urge to solve
> > > > it,
> > > if
> > > > anyone
> > > > can help i would appreciate it:
> > > >
> > > > # mysql mysql -p
> > > > Enter password:
> > > > Welcome to the MySQL monitor. Commands end with ; or \g.
> > > > Your MySQL connection id is 303342 to server version: 5.0.18
> > > >
> > > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> > > >
> > > > mysql> show tables;
> > > > ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9)
> > > > mysql>
> > > >
> > > >
> > > > I have backups of all databases, including mysql database which i think
> > > > is
> > > the
> > > > one
> > > > broken , how can i restore it ?
> > > >
> > > > Thanks for your help
> > >
> > > You are running out of file descriptors. Search the archives for answers.
> > >
> > > -Otto
> >
>
> --
> #!/usr/bin/perl
> if ((not 0 && not 1) != (! 0 && ! 1)) {
> print "Larry and Tom must smoke some really primo stuff...\n";
> }