On Sun, 15 Jul 2007, Marcos Laufer wrote:

> Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm

No you did not. You plugged in bigger numbers. That could very well be
your problem. Also there should be some correspondence to the numbers
in login.conf and my.cnf.

Another thing to watch out for: the login.conf syntax is extremely
unforgiving, an extra space or tab after a \ can ruin your day.

        -Otto
        

> 
> And now i have this configuration:
> 
> I start mysql with this script:
> 
> # cat /usr/local/bin/mysql.start
> if [ -x /usr/local/bin/mysqld_safe ] ; then
>     su -c _mysql root -c '/usr/local/bin/mysqld_safe &' > /dev/null &
> echo -n ' mysql'
> fi
> 
> That properly starts it with the correct login class.
> 
> My login.conf for mysql is:
> 
> _mysql:\
>        # :openfiles=8192:\
>         :openfiles=infinity:\
>         :datasize=infinity:\
>         :maxproc=infinity:\
>         #:openfiles-cur=8192:\
>         :openfiles-cur=infinity:\
>         #:openfiles-max=10000:\
>         :openfiles-max=infinity:\
>         :stacksize-cur=8M:
> 
> I want to set infinity on those now just for testing, if everything works
> fine i will put some limits there.
> 
> 
> My kern.maxfiles:
> 
> # sysctl kern.maxfiles
> kern.maxfiles=20000
> 
> 
> And my.cnf has :
> 
> [mysqld]
> socket = /var/www/logs/mysql/mysql.sock
> old-passwords
> tmpdir = /var/mysql/tmp
> open_files_limit = 10000
> max_connections = 4096
> sql-mode = MYSQL40
> skip-name-resolve
> table_cache = 5000
> query_cache_size = 64M
> thread_cache = 32
> key_buffer = 128M
> long_query_time = 5
> thread_concurrency = 2
> interactive_timeout=60
> wait_timeout=60
> connect_timeout=15
> record_buffer=8M
> 
> basedir=/usr/local
> datadir=/var/mysql
> 
> sort_buffer_size = 32M
> read_buffer_size = 2M
> read_rnd_buffer_size = 4M
> myisam_sort_buffer_size = 64M
> 
> [mysql.server]
> old-passwords
> 
> [mysqld_safe]
> open-files=8192
> open_files_limit = 10000
> max_connections = 4096
> 
> [mysqlcheck]
> socket = /var/www/logs/mysql/mysql.sock
> 
> --
> 
> The server has more than 100 databases, it's been working fine for about a
> year .
> A couple of days ago i found that no database could be accessed . Errors
> like this appear:
> 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file:
> './ip041271_tan1/mos_weblinks.frm' (errno: 9)
> 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file:
> './ip041271_tan1/mos_weblinks.frm' (errno: 9)
> 
> I restart the server and everything goes back to normal , but i reach my
> limits if i execute a:
> 
> mysqlcheck -m -A -p
> 
> 
> By the moment the limits are reached, i noticed that this values Open_files
> and Opened_tables reached:
> 
> mysql> show status like '%Open%';
> +------------------------+-------+
> | Variable_name          | Value |
> +------------------------+-------+
> | Com_ha_open            | 0     |
> | Com_show_open_tables   | 0     |
> | Open_files             | 2031  |
> | Open_streams           | 0     |
> | Open_tables            | 1053  |
> | Opened_tables          | 0     |
> | Slave_open_temp_tables | 0     |
> +------------------------+-------+
> 7 rows in set (0.00 sec)
> 
> or for example
> 
> mysql> show status like 'open%';
> +---------------+-------+
> | Variable_name | Value |
> +---------------+-------+
> | Open_files    | 2030  |
> | Open_streams  | 0     |
> | Open_tables   | 1077  |
> | Opened_tables | 0     |
> +---------------+-------+
> 4 rows in set (0.00 sec)
> 
> 
> I know i must be doing something wrong, but i just can't find out what .
> I still don't know why i reach limits with mysqlcheck when i am setting
> all those values right. I guess the limit i'm reaching is Open_files .
> The question is , why?
> 
> Regards,
> Marcos

Reply via email to