query_cache_size=32m
# the number of open tables for all threads. increasing this value
# increases the number of file descriptors that mysqld requires. # therefore you have to make sure to set the amount of open files # allowed to at least 4096 in the variable open-files-limit in # section [mysqld_safe] table_cache=256# maximum size for internal (in-memory) temporary tables. if a table
# grows larger than this value, it is automatically converted to disk # based table this limitation is for a single table. there can be many # of them. tmp_table_size=5m
复制代码
另外,再介绍下php设置运行时内存大小的方法。
如果在php程序运行时出现如下的错误:fatal error: allowed memory size of 20971520 bytes exhausted (tried to allocate 7325604 bytes) in …(可用的内存为20971520 bytes,尝试分配。。。)则说明运行时分配的内存不够,此时需要增加支撑php运行的内存了。
解决办法:一、在php程序里动态分配内存
@ini_set(‘memory_limit’,’60m‘); //修改60m二、php.ini 中配置
memory_limit = 20m //修改 20m就介绍这些了,记得老板曾说过一句话,我相信你们的技术水平,如果遇到非常难以解决的问题,就适当发挥硬件的优势吧,哈哈,那就加内存,加cpu,或者上更高配置机器吧。
