GBASE 8s 数据库残留内存清除

当数据库非正常状态关闭时,再次通过oninit –vy启动数据库,会发生如下错误。

Warning: Parameter's user-configured value was adjusted. (DS_MAX_SCANS)

Warning: Parameter's user-configured value was adjusted. (ONLIDX_MAXMEM)

oninit: Fatal error in shared memory creation

Reading configuration file '/opt/database/etc/onconfig.ol_gbasedbt1210'...succeeded

Creating /GBASEDBTTMP/.infxdirs...succeeded

Allocating and attaching to shared memory...FAILED

WARNING: server initialization failed or timed out.

Check the message log, online.log, for errors.

这说明一些系统资源被占用,数据库无法正常启动。

此时需要通过onclean -ky命令尝试清除这些资源,但是有时仍然无法清除干净。

我们需要通过ips进行查看

------ Shared Memory Segments --------

key        shmid      owner      perms      bytes      nattch     status      

0x00000000 98304      root       600        393216     2          dest         

0x00000000 131073     root       600        393216     2          dest         

0x00000000 163842     root       600        393216     2          dest         

0x00000000 196611     root       600        393216     2          dest         

0x00000000 229380     root       600        393216     2          dest         

0x00000000 262149     root       600        393216     2          dest         

0x00000000 294918     root       600        393216     2          dest         

0x00000000 327687     root       600        393216     2          dest         

0x00000000 360456     root       600        393216     2          dest         

0x00000000 393225     root       600        393216     2          dest         

0x00000000 425994     root       600        393216     2          dest         

0x00000000 458763     root       600        393216     2          dest         

0x00000000 491532     root       600        393216     2          dest         

0x00000000 524301     root       600        393216     2          dest         

0x00000000 557070     root       600        393216     2          dest         

0x52564801 884751     root       660        9048064    8                       

0x52564802 917520     root       660        103809024  8                       

0x52564803 950289     root       660        67108864   8                       

0x00000000 688146     root       600        393216     2          dest         

0x00000000 720915     root       600        393216     2          dest         

0x00000000 753684     root       600        393216     2          dest         

------ Semaphore Arrays --------

key        semid      owner      perms      nsems     

0x00000000 0          root       600        1         

0x00000000 65537      root       600        1         

0x00000000 294914     root       660        4         

0x00000000 327683     root       660        1         

0x00000000 360452     root       660        1         

0x00000000 393221     root       660        1         

0x00000000 425990     root       660        1         

0x00000000 458759     root       660        4         

0x00000000 491528     root       660        1         

0x00000000 524297     root       660        1         

0x00000000 557066     root       660        1         

0x00000000 589835     root       660        1

并通过ipcrm  shmid 的方式逐项进行移除

如果其中没有其它应用的资源,我们可以通过执行下列命令进行快速清除。

ipcs -m|awk ' /^0x/{print $2}'|while read line;do ipcrm -m $line;done

echo 3 > /proc/sys/vm/drop_caches

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

八珍豆腐

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值