Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

mysql tomcat Too many open files in system

mysql tomcat Too many open files in system
1. MySQL:Too many open files in system
À´Ô´£ºhttp://phorum.study-area.org/index.php?topic=10819.0
¡ù ÒýÊö¡¶jacinth.bbs@bbs.cs.nthu.edu.tw (ó¯òë)¡·Ö®銘ÑÔ£º
> hi¸÷λ
> ÎÒµÄϵ統Ö÷ÒªÅÜwww+php+mysql
> Óв»ÉÙÈËÔÚʹÓÃ
> 這兩ÌìÈË數Ôö¼ÓáámysqlµÄlog檔Ò»Ö±complain這類µÄ訊Ï¢:
> 020729 10:09:41  Error in accept: Too many open files in system
> 請問ÓÐ沒ÓÐʲ麼±È較ºÃµÄ½â決·½·¨?
> 謝謝Äã
ÄãÏȵ½ /proc/sys/fs/ µ×ÏÂ
裡頭ÓÐ兩個檔°¸
file-nr file-max
ÒÔÎÒ現ÔÚϵ統µÄ狀態:
$cat file-nr
1543    298     26208
$cat file-max
26208
file-max ÊÇ×î´ó¿ÉÒÔ開啟¶àÉÙ file descriptor
file-nr: µÚÒ»個參數ÊÇϵ統Ä¿Ç° allocate ¶àÉÙ個 file descriptor
         µÚ¶þ個參數ÊÇÒÑ經ʹÓÃ幾個 file descriptor
         µÚÈý個參數ÊÇ×î´ó¿ÉÒÔʹÓà file descriptor
file-max ÊÇ¿ÉÒÔ調ÕûµÄ
$echo 10000000 > file-max
$cat file-nr
1543    256     10000000
2.½â¾öTomcat Too Many Open FilesÎÊÌâ
À´Ô´£ºhttp://www.haoguoliang.com/blog/2009/08/too-many-open-files.html
Õâ¸öÎÊÌâÊǵÚÒ»´ÎÔÚLinux»·¾³ÏÂÅöµ½£¬°Ñ½â¾öµÄ·½·¨¼Ç¼ÏÂÀ´¡£
·þÎñÆ÷ÅäÖãºÁ½¸öË«ºËCPU 2.0G£¬4GÄÚ´æ
²Ù×÷ϵͳ£ºCentOS£¬ÄÚºË2.6.18
Ó¦ÓÃ1¡¢ËÑË÷·þÎñÆ÷£¬¸ºÔðÈ«Õ¾µÄËÑË÷ºÍÌṩÄÚÈÝÏà¹ØÐÔ½Ó¿Ú
Ó¦Ó÷þÎñÆ÷£ºTomcat6.0.16+Apache2.2.8£¬ÆäÖÐÁ½¸öTomcatʵÀý£¬Ò»¸ö¶ÔÍâÌṩ·þÎñ£¬Ò»¸ö¶ÔÄÚ¹ÜÀíË÷Òý(´´½¨¡¢É¾³ý¡¢¼ìË÷µÈ)
Web·½°¸£ºSolr1.3(With Solr Client For Java)¡¢Java Servlet(Web Service ½Ó¿Ú)
Ó¦ÓÃ2¡¢ÀàËÆÓÚ°Ù¶ÈÖªµÀµÄÒ»¸öÓ¦ÓÃ
Ó¦Ó÷þÎñÆ÷£ºÓëËÑË÷·þÎñÆ÷¹²ÏíApache2.2.8
Web·½°¸£ºPhp+Mysql
ÎÊÌâÖ¢×´£ºËÑË÷·þÎñÍ£Ö¹£¬Ó¦ÓÃ2ÏìÓ¦³¬Ê±£¬Ç£Á¬È«Õ¾µÄËÑË÷½Ó¿Úµ÷ÓÃÄÚÈݵÄÊä³ö£¬²é¿´CatalinaÈÕÖ¾£¬´óÁ¿µÄÈçÏÂÐÅÏ¢£º
org.apache.jk.common.ChannelSocket acceptConnections
WARNING:


Ïà¹ØÎĵµ£º

mysql update set

update  article set body = (REPLACE(body, '</div>', ' ')) where typeid=21
ÓÃupdateºÍreplaceÔÚmysqlÖÐÌ滻ijһ¸ö×ֶεIJ¿·ÖÄÚÈÝ
update users_settings set `ConfigValue` = replace(configvalue,' fromstr' 'tostr') where `ConfigName`='accesslist'
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼Ç ......

mysqlÖÐint¡¢bigint¡¢smallint ºÍ tinyintµÄÇø±ð


ʹÓÃÕûÊýÊý¾ÝµÄ¾«È·Êý×ÖÊý¾ÝÀàÐÍ¡£
bigint
´Ó -2^63 (-9223372036854775808) µ½ 2^63-1 (9223372036854775807) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 8 ¸ö×Ö½Ú¡£
int
´Ó -2^31 (-2,147,483,648) µ½ 2^31 - 1 (2,147,483,647) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 4 ¸ö×Ö½Ú¡£int µÄ SQL-92 ͬÒå×ÖΪ integer¡£
smallin ......

Mysql ÊÂÎñ´¦Àí

¡¡¡¡ÊÂÎñÊÇDBMSµÃÖ´Ðе¥Î»¡£ËüÓÉÓÐÏÞµÃÊý¾Ý¿â²Ù×÷ÐòÁÐ×é³ÉµÃ¡£µ«²»ÊÇÈÎÒâµÃÊý¾Ý¿â²Ù×÷ÐòÁж¼ÄܳÉΪÊÂÎñ¡£Ò»°ãÀ´Ëµ£¬ÊÂÎñÊDZØÐëÂú×ã4¸öÌõ¼þ£º£¨ACID£©
¡¡¡¡Ô­×ÓÐÔ£¨Autmic£©£ºÊÂÎñÔÚÖ´ÐÐÐÔ£¬Òª×öµ½“Ҫô²»×ö£¬ÒªÃ´È«×ö£¡”£¬¾ÍÊÇ˵²»ÔÊÐíÊÂÎñ²¿·ÖµÃÖ´ÐС£¼´Ê¹ÒòΪ¹ÊÕ϶øʹÊÂÎñ²»ÄÜÍê³É£¬ÔÚrollbackʱҲҪÏû³ý¶ÔÊ ......

WindowsÏ°²×°×îеÄApache+PHP+MySQLÖ¸ÄÏ



   ´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XP
쵀Apache+PHP+MySQL
°²×°£¬Í¬Ê±Ò²ÊÊÓÃÓÚWindows 2003
ϵͳϵݲװºÍÅäÖá£
1.
°²×°»·¾³
²Ù×÷ϵͳÊÇ Windows XP
ÖÐÎÄ°æ, Apache,
PHP, MySQL
µÄ×îа汾ÊǽØÖ¹µ½ 2007.09.07
£¬·Ö±ðÔÚÆä¹ÙÍøÏÂÔصÄ:
* Apache 2.2.6
£ºhttp://apache.mirror.phpchina.c ......

MySQL±í±ÀÀ£

Èç¹ûÔÚһЩ¸üÐÂÃüÁîÖ®ºó£¬mysqld×ÜÊǵ±µô£¬»òÕßÈç¹ûÄãÓöµ½±»ÆÆ»µµÄ±í£¬Äã¿ÉÒÔÓÃÏÂÃæµÄ²Ù×÷²âÊÔ¿´Õâ¸öȱÏÝÊÇ·ñÊÇ¿ÉÖظ´²úÉúµÄ£º
жµôMySQLÊØ»¤½ø³Ì£¨ÓÃmysqladmin shutdown£©¡£
¸ø¸Ã±í×ö±¸·Ý£¨·ÀÖ¹ÐÞ¸´²Ù×÷·´¶ø¸ã»µÕâÖֺܲ»¿ÉÄܳöÏÖµÄÇé¿ö£©¡£
Óà myisamchk -s database/*.MYI ¼ì²éËùÓÐµÄ±í£¬ÓÃmyisamchk -r database/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ