# After upgrade to 2.39.0, the grafana takes too much CPU

**URL:** <https://forums.percona.com/t/after-upgrade-to-2-39-0-the-grafana-takes-too-much-cpu/25450>\
**Category:** PMM 2.x\
**Created:** [September 26, 2023, 6:37am UTC](https://forums.percona.com/t/after-upgrade-to-2-39-0-the-grafana-takes-too-much-cpu/25450 "2023-09-26T06:37:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Luke03011](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/luke03011/32/16409_2.png) [@Luke03011](https://forums.percona.com/u/Luke03011)\
**Post date:** [September 27, 2023, 6:40am UTC](https://forums.percona.com/t/after-upgrade-to-2-39-0-the-grafana-takes-too-much-cpu/25450/5 "2023-09-27T06:40:51Z")

</div>

update:  
The high load seems to be caused by invalid api key(username and password) from `pmm-client` side, I check the logs on the `pmm-client` side:

```auto
INFO[2023-09-27T01:17:51.297+00:00] 2023-09-27T01:17:51.297Z	error	VictoriaMetrics/app/vmagent/remotewrite/client.go:422	unexpected status code received after sending a block with size 40436 bytes to "1:secret-url" during retry #21: 401; response body="{\"code\":16,\"error\":\"invalid API key\",\"message\":\"invalid API key\"}\n"; re-sending the block in 60.000 seconds agentID=/agent_id/e19f9ad4-b27d-4fba-a821-1fb7302675a8 component=agent-process type=vm_agent
INFO[2023-09-27T01:17:51.299+00:00] 2023-09-27T01:17:51.299Z	error	VictoriaMetrics/app/vmagent/remotewrite/client.go:422	unexpected status code received after sending a block with size 40449 bytes to "1:secret-url" during retry #21: 401; response body="{\"code\":16,\"error\":\"invalid API key\",\"message\":\"invalid API key\"}\n"; re-sending the block in 60.000 seconds agentID=/agent_id/e19f9ad4-b27d-4fba-a821-1fb7302675a8 component=agent-process type=vm_agent

```

I do not know why after upgrading the `pmm-client`, it can not communicate with `pmm-server` correctly.

By the way, the `database locked` issue disappears after I add the following option to `/etc/grafana/grafana.ini`:

```auto
[database]
connection_string=file:/srv/grafana/grafana.db?cache=private&mode=rwc&_journal_mode=WAL

```

And after remove all pmm clients and reinstalled them, finally it return to normal.

---

_[View the full topic](https://forums.percona.com/t/after-upgrade-to-2-39-0-the-grafana-takes-too-much-cpu/25450)._
