Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Data too long for column 'task_data' #2206

Closed
5 tasks done
s3lph opened this issue Aug 12, 2023 · 1 comment · Fixed by #2418
Closed
5 tasks done

Error: Data too long for column 'task_data' #2206

s3lph opened this issue Aug 12, 2023 · 1 comment · Fixed by #2418
Labels
bug Something isn't working

Comments

@s3lph
Copy link
Contributor

s3lph commented Aug 12, 2023

Component

server

Describe the bug

I have a Gitlab-CI config I'd like to migrate to Woodpecker. Said config builds roughly 60 Debian packages, each in its own step for parallelization. When starting a Woodpecker pipeline with this config, the build gets stuck at "not yet started", and in the log of woodpecker-server, I can see the following lines:

Aug 12 22:26:23 woodpecker woodpecker-server[1669020]: {"level":"error","error":"Error 1406 (22001): Data too long for column 'task_data' at row 1","time":"2023-08-12T22:26:23+02:00","message":"queuePipeline"}
Aug 12 22:26:23 woodpecker woodpecker-server[1669020]: {"level":"error","error":"Error 1406 (22001): Data too long for column 'task_data' at row 1","time":"2023-08-12T22:26:23+02:00","message":"failure to start pipeline for REDACTED"}
Aug 12 22:26:23 woodpecker woodpecker-server[1669020]: {"level":"error","error":"Error #01: failure to start pipeline for s3lph/package-pipeline\n","ip":"REDACTED","latency":299.93838,"method":"POST","path":"/hook","status":500,"time":"2023-08-12T20:26:23Z","user-agent":"Go-http-client/1.1","time":"2023-08-12T22:26:23+02:00"}

My Woodpecker instance is backed by a MariaDB database. The schema definition of the tasks relation is:

CREATE TABLE `tasks` (
  `task_id` varchar(255) NOT NULL,
  `task_data` blob DEFAULT NULL,
  `task_labels` text DEFAULT NULL,
  `task_dependencies` text DEFAULT NULL,
  `task_run_on` text DEFAULT NULL,
  `task_dep_status` text DEFAULT NULL,
  `agent_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`task_id`),
  UNIQUE KEY `UQE_tasks_task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

As we can see here, tasks_data is of type BLOB, which can only store up to 64KiB. Unfortunately, the log entries doesn't show how much size would actually be required. I'd assume migrating to MEDIUMBLOB (up to 16 MiB) (or even LONGBLOB, up to 4 GiB) should resolve the issue.

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"1.0.1"}

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@s3lph s3lph added the bug Something isn't working label Aug 12, 2023
@s3lph
Copy link
Contributor Author

s3lph commented Aug 12, 2023

Related to #1022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant