开发者社区> 问答> 正文

Postgresql 报错:worker took too long to start 导致CPU 的使用率达到96%

大家好,请教一个问题,前段时间我遇到一个问题,我们的数据库是基于pg9.3版本的,操作系统是Centos6.4操作系统,不知道什么原因,导致数据库报错 worker took too long to start; canceled 从而导致服务器的CPU的使用率达到了96%,进而导致数据库和服务器宕机,请问这大概是什么原因,怎么引起的呢?明白原因后我好继续排查问题,希望大家不吝赐教,谢谢大家。

附日志部分报错信息:
2016-03-31 05:04:53.993 CST - zyml - glptuser - fb09 : LOG: process 108742 acquired ExclusiveLock on extension of relation 80385 of database 24576 after 2803790.559 ms
2016-03-31 05:04:53.993 CST - zyml - glptuser - fb09 : STATEMENT: insert into T_ZY_VALUE_TEMP (C_ID,N_ZY_ID,N_FY,D_TJSJ,N_VALUE,N_ZL,N_JB) select replace(''||uuid_generate_v4(), '-', '') as C_ID,N_ZY_ID,N_JBFY as N_FY,now() as D_TJSJ,N_VALUE,N_ZL, 1 from ( SELECT COUNT (1) as N_VALUE,MSES.N_JBFY as N_JBFY,437 as N_ZY_ID,1 as N_ZL from DB_MSES.T_MSESDSR DSR INNER JOIN DB_MSES.T_MSESYASTML STML ON DSR.N_AJBS = STML.N_AJBS AND DSR.N_DSR=STML.N_XH INNER JOIN DB_MSES.T_MSES MSES ON DSR.N_AJBS = MSES.N_AJBS WHERE (STML.N_LX = 1 OR STML.N_LX = 4) AND STML.N_SF IS NULL GROUP BY MSES.N_JBFY) as temp
2016-03-31 05:05:54.672 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 05:07:05.375 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 05:18:38.168 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 05:52:36.340 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 07:16:01.209 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 07:31:17.312 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 07:40:58.997 CST - [unknown] - appuser - postgres : LOG: could not receive data from client: Connection reset by peer
2016-03-31 07:59:57.668 CST - - - : WARNING: autovacuum worker started without a worker entry
2016-03-31 08:04:53.137 CST - - - : WARNING: autovacuum worker started without a worker entry
2016-03-31 08:29:09.090 CST - [unknown] - appuser - postgres : LOG: could not receive data from client: Connection reset by peer
2016-03-31 09:32:50.259 CST - - - : WARNING: worker took too long to start; canceled
2016-03-31 09:35:41.776 CST - [unknown] - [unknown] - [unknown] : WARNING: pg_getnameinfo_all() failed: 域名解析暂时失败
2016-03-31 09:37:21.383 CST - - - : WARNING: worker took too long to start; canceled

展开
收起
彭占元 2016-04-01 15:31:30 10719 0
2 条回答
写回答
取消 提交回答
  • PostgreSQL你值得拥有。

    从报错上来看,像是因为autovacuum launcher想要创建新的worker,但是却发现上次创建计划仍然没有成功,但是不确定,如果再次遇到这样的问题,请把对应的调用栈保存下来。

    2019-07-17 18:37:10
    赞同 展开评论 打赏
  • 公益是一辈子的事, I am digoal, just do it. 阿里云数据库团队, 擅长PolarDB, PostgreSQL, DuckDB, ADB等, 长期致力于推动开源数据库技术、生态在中国的发展与开源产业人才培养. 曾荣获阿里巴巴麒麟布道师称号、2018届OSCAR开源尖峰人物.

    有方法能重现吗?

    2019-07-17 18:37:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像