间歇性慢查询 [英] Intermitent slow queries

查看:133
本文介绍了间歇性慢查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚将本地存储的Postgres数据库从本地使用移植到Azure托管Postgresql实例.

每隔一段时间(1-2天一次)持续几分钟,数据库中就会发生一些事情,即使是简单的查询也要花费30秒以上的时间,或者只是超时,我不知道该怎么做,除非进行一些刷新...通常它会恢复工作, 没有干预,我也不知道是什么原因...或在日志中寻找什么.

CPU利用率低于20%,并且在事件发生时所监视的任何活动都没有峰值.

We've just ported a locally stored postgres database from on-prem use to Azure an managed postgresql instance.

Every once in a while, (1-2 days frequency) for a few minutes something happends to the database that even a simple query takes well over 30 seconds, or just times out and I don't know what to do unless do some refreshes... Usually it just resumes working, without intervention and I have no Idea what causes it... or what to look for in the logs.

The CPU is under 20% utilization, and no spikes in any of the activity monitored around the time of the incidents.

记忆似乎仍然很高,达到60%,但是没有迹象表明在事件发生时情况会更糟,并且在其余时间中,它仍然可以正常工作...

The memory seems to stay quite high, at 60% but there are no indications to be worse at the time of the incidents, and it the rest of the time, it just works...

日志也不是很明确

我得到的是:无法向客户端发送数据:远程主机强行关闭了现有连接."

All I get is: "could not send data to client: An existing connection was forcibly closed by the remote host."

不确定我应该寻找什么.可能是一些我忘记检查的简单设置.

Not sure what I should look for. Probably some simple setting I forgot to check.

谢谢

克里斯

推荐答案

Finebytes,

Hi Finebytes,

这些特定事件发生的时间是否有时间戳?

Do you have timestamps for when these specific occurrences happen?

您是否监视PostgreSQL实例的任何方面?

Do you monitor any aspects of your PostgreSQL instance?

让我们对此进行调查.此致〜Mike

Let's investigate this. Regards, ~Mike


这篇关于间歇性慢查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆