redhat,【Allocating and attaching to shared memory...FAILED】
OS:Linux yucheng 2.6.9-42.EL #1 Wed Jul 12 23:16:43 EDT 2006 i686 i686 i386 GNU/Linux
物理内存:512M
su - informix ;
ulimit -a显示如下:
time(cpu-seconds) unlimited
file(blocks) unlimited
coredump(blocks) 0
data(kbytes) unlimited
stack(kbytes) 300000
lockedmem(kbytes) 32
memory(kbytes) unlimited
nofiles(descriptors) 1024
processes 4544
修改了部分onconfig参数后:
yucheng:/home/informix/etc>oninit -v
Checking group membership to determine server run modesucceeded
Reading configuration file '/home/informix/etc/onconfig'...succeeded
Creating /INFORMIXTMP/.infxdirs ... succeeded
Creating infos file "/home/informix/etc/.infos.demo_on" ... "/home/informix/etc/.conf.demo_on" ... succeeded
Writing to infos file ... succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...FAILED
oninit: Fatal error in shared memory creation
请问该从哪里来解决呢?
谢谢! 已经修改为:
LOGSIZE 200 # Logical log size (Kbytes)
# Shared Memory Parameters
LOCKS 2000 # Maximum number of locks
#BUFFERS 5000 # Maximum number of shared buffers
BUFFERS 500 # Maximum number of shared buffers
NUMAIOVPS # Number of IO vps
PHYSBUFF 32 # Physical log buffer size (Kbytes)
LOGBUFF 32 # Logical log buffer size (Kbytes)
CLEANERS 1 # Number of buffer cleaner processes
SHMBASE 0x44000000L # Shared memory base address
#SHMVIRTSIZE 8192 # initial virtual shared memory segment size
SHMVIRTSIZE 2048 # initial virtual shared memory segment size
#SHMADD 8192 # Size of new shared memory segments (Kbytes)
SHMADD 2048 # Size of new shared memory segments (Kbytes)
#EXTSHMADD 8192 # Size of new extension shared memory segments (Kbytes)
EXTSHMADD 2048 # Size of new extension shared memory segments (Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
#CKPTINTVL 300 # Check point interval (in sec)
CKPTINTVL 3600 # Check point interval (in sec)
LRUS 8 # Number of LRU queues
LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
TXTIMEOUT 300 # Transaction timeout (in sec)
STACKSIZE 32 # Stack size (Kbytes)
这几个参数改了还是不行啊..... 1/看一下日志~~online.log里的内容.
2/ps -ef |grep oninit 看一下是否有oninit进程没有关闭. ipcs -m
看看是否当前已经有informix的共享内存。
对了,oninit进程应该是以root权限执行的。 修改操作系统核心参数文件/etc/sysctl.conf
需要根据内存大小增加一行:
kernel.shmmax=XXXXXXXX
如果全用来做数据库大小一般为物理内存的70-80% 将onconfig中的:
#SHMBASE 0x44000000L # Shared memory base address
修改为
SHMBASE 0x10000000 # Shared memory base address
就可以了!
呵呵,看来是一些参数不合理! 原帖由 czyf2001 于 2007-11-27 11:46 发表 http://bbs.chinaunix.net/images/common/back.gif
将onconfig中的:
#SHMBASE 0x44000000L # Shared memory base address
修改为
SHMBASE 0x10000000 # Shared memory base address
就可以了!
呵呵,看来是一些参数不合理!
建议使用onconfig.std的默认配置~~~
回复 #2 czyf2001 的帖子
以前我也碰到过这样的问题,好像是共享内存设置不对. 哈哈,这个问题,应该是你初始化的rootdbs 没有赋予660权限。chmod 660xxxx(你对应的rootdbs文件,在$informixdir/etc/onconfig.xxx中配置的)
页:
[1]