RE: repost: Too many open files
Thanks for all the replies. They have all helped me solve the actual problem, which was fairly obvious once you know it, as always. I was starting the mysql server from a prompt as user mysql, not root. Only root has the privileges to up the open file limit of a bash session. This explained the setrlimit warning in the error log. Once I started the server as root then this warning went away, and I presume the open file limit was raised to what was requested. Again, thanks for all the help. Robin -Original Message- From: Adams, Bill TQO [mailto:[EMAIL PROTECTED]] Sent: 02 October 2001 19:08 To: Colin Faber Cc: Robin Keech; [EMAIL PROTECTED] Subject: Re: repost: Too many open files Colin Faber wrote: it sounds like you've run out of file descriptors, I suggest rebuilding your kernel to handle more. In a bsd kernel you can do this simply by upping the maximum number of users allowed to access the machine at any given time. Or in Linux (in my rc.local): echo Set max files to 32768 echo 32768 /proc/sys/fs/file-max --Bill mysql --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
repost: Too many open files
Hi, Any help would be greatly appreciated as I have a production server that is struggling. (I only get the digest list, so could you copy me on any replies - thankyou). My error log show this... 011002 9:16:11 Error in accept: Too many open files 011002 9:36:43 /usr/local/mysql/libexec/mysqld: Shutdown Complete 011002 09:36:43 mysqld ended 011002 09:36:52 mysqld started 011002 9:36:52 Warning: setrlimit couldn't increase number of open files to more than 1024 011002 9:36:52 Warning: Changed limits: max_connections: 500 table_cache: 257 /usr/local/mysql/libexec/mysqld: ready for connections I am getting the too many open files error. What does the setrlimit log line mean? How many connections can I have before reaching 'too many connections'? What can I do about it? I have looked in docs. open_files_limit If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of files. You should try increasing this if mysqld gives you the error 'Too many open files'. mine is 0 so it should use quite a big number ( 500 * 5) - is this too big? Should I set open_file_limits directly to something smaller? I have ... /proc/sys/fs/file-max = 8192 /proc/sys/fs/file-nr = 2097 14118192 my.cnf # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=384M set-variable= max_allowed_packet=2M set-variable= max_connections=500 set-variable= table_cache=512 set-variable= sort_buffer=2M set-variable= record_buffer=2M set-variable= thread_cache=8 set-variable= wait_timeout=1800 # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=4 set-variable= myisam_sort_buffer_size=64M log-bin low-priority-updates binlog-ignore-db=e3 server-id = 1 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: repost: Too many open files
it sounds like you've run out of file descriptors, I suggest rebuilding your kernel to handle more. In a bsd kernel you can do this simply by upping the maximum number of users allowed to access the machine at any given time. Robin Keech wrote: Hi, Any help would be greatly appreciated as I have a production server that is struggling. (I only get the digest list, so could you copy me on any replies - thankyou). My error log show this... 011002 9:16:11 Error in accept: Too many open files 011002 9:36:43 /usr/local/mysql/libexec/mysqld: Shutdown Complete 011002 09:36:43 mysqld ended 011002 09:36:52 mysqld started 011002 9:36:52 Warning: setrlimit couldn't increase number of open files to more than 1024 011002 9:36:52 Warning: Changed limits: max_connections: 500 table_cache: 257 /usr/local/mysql/libexec/mysqld: ready for connections I am getting the too many open files error. What does the setrlimit log line mean? How many connections can I have before reaching 'too many connections'? What can I do about it? I have looked in docs. open_files_limit If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of files. You should try increasing this if mysqld gives you the error 'Too many open files'. mine is 0 so it should use quite a big number ( 500 * 5) - is this too big? Should I set open_file_limits directly to something smaller? I have ... /proc/sys/fs/file-max = 8192 /proc/sys/fs/file-nr = 2097 14118192 my.cnf # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=384M set-variable= max_allowed_packet=2M set-variable= max_connections=500 set-variable= table_cache=512 set-variable= sort_buffer=2M set-variable= record_buffer=2M set-variable= thread_cache=8 set-variable= wait_timeout=1800 # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=4 set-variable= myisam_sort_buffer_size=64M log-bin low-priority-updates binlog-ignore-db=e3 server-id = 1 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: repost: Too many open files
Colin Faber wrote: it sounds like you've run out of file descriptors, I suggest rebuilding your kernel to handle more. In a bsd kernel you can do this simply by upping the maximum number of users allowed to access the machine at any given time. Or in Linux (in my rc.local): echo Set max files to 32768 echo 32768 /proc/sys/fs/file-max --Bill mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php