Description
Bug description
It looks like our usage
component is logging an error containing tons of workspace IDs once every minute:
github.com/gitpod-io/gitpod/usage/pkg/db/workspace.go:68 Error 1390: Prepared statement contains too many placeholders\n[140.200ms] [rows:0] SELECT * FROM `d_b_workspace` WHERE `d_b_workspace`.`id` IN ('techlabapps-myjourney-mysicp2zuyi','antdesign-antdesign-j3ad1xm6oqt',.........
I believe the problem arises here:
when we try to get all the workspaces corresponding to all the workspace instances which ran some time this month.
Reminder: Gitpod runs tons of workspaces and instances each month. We should be careful when querying them all into memory and/or dumping them all into logs. (And, currently, the usage component does both every minute.)
See also:
- slack thread (internal)
- cloud logging (internal)
Steps to reproduce
- Check
usage
component logs in production
Workspace affected
No response
Expected behavior
No response
Example repository
No response
Anything else?
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Done