今天在AIX下安装MYSQL的时候,配置文件用large.cnf改的。参数都默然。启动MYSQLD服务,出现如下问题:
# ./mysqld 101220 15:16:02 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. 101220 15:16:02 [Note] Plugin 'FEDERATED' is disabled. 101220 15:16:02 InnoDB: Error: cannot allocate 1048576 bytes of InnoDB: memory with malloc! Total allocated memory InnoDB: by InnoDB 481856 bytes. Operating system errno: 12 InnoDB: Check if you should increase the swap file or InnoDB: ulimits of your operating system. InnoDB: On FreeBSD check you have compiled the OS with InnoDB: a big enough maximum process size. InnoDB: Note that in most 32-bit computers the process InnoDB: memory space is limited to 2 GB or 4 GB. InnoDB: We keep retrying the allocation for 60 seconds... 101220 15:17:02 InnoDB: We now intentionally generate a seg fault so that InnoDB: on Linux we get a stack trace. 101220 15:17:02 - mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=268435456 read_buffer_size=1048576 max_used_connections=0 max_threads=50 threads_connected=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 364860 K bytes of memory Hope that
|
说的是内存分配有问题。系统限制了内存分配的大小。检查后,把key_buffer_size由256M改成64M.然后就正常启动了
但是这个key_buffer_size值调大就不行。另外一台同样配置的机器安装是正常的。比较2个机器的 /etc/security/limits 文件,发现不受限制的配置文件的值都是-1。将相应值该为"-1" 表示不受 soft limits的限制(unlimited)。
下面我们将就各字段逐一进行介绍:
fsize 用户创建的文件大小限制。此定义值(512字节为单位)为该用户可以生成的最大文件的大小。
core 生成的core文件大小的限制(512字节为单位)。
cpu 用户进程可用cpu的限定值(以秒为单位)。普通用户只能将此值减小,root可以将此值增大。这里要注意的
是进程使用CPU的时间取决于AIX Kernel(核心程序)进程调度算法,该值在此仅做参考。
data 进程数据段大小的限定值(以字节为单位)。
stack 进程堆栈段大小的限定值(以字节为单位)。
rss 进程常驻内存段的限定值(以字节为单位)。AIX核心并不参考此限定。
nofiles 进程中打开文件的最大数量。此限定在AIX 4.3.1之前的版本中固定为2000
修改完,重新启动MYSQLD服务,一切都正常了。
阅读(1886) | 评论(1) | 转发(0) |