Once every few weeks, I get an alert on my CPU being at 100% on my DO Managed MYSQL
I manually kill a query from DO logs and queries tab and it gets solved.
I’d like to avoid these in the future so I have tried:
So how do I set a max timeout -or- how do i have access to kill queries that are taking too long?
When I was running my own mysql it was easy, but with DO’s limitations I’m a bit lost
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
For the Managed Database clusters, you can’t directly make the changes, but instead, you would need to use the DigitalOcean API. You can find the documentation on how to make such config changes to your managed clusters here:
https://docs.digitalocean.com/reference/api/api-reference/#operation/databases_patch_config
Your request will look something like this:
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"config": {"max_allowed_packet": "67108864","sql_require_primary_key": true}}' \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config"
The max_execution_time
is not configurable as far as I can see, but you can try also increasing the connect_timeout
instead.
Let me know how it goes!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.