Actions
action #53435
open[logwarn] o3: DBI Exception: number of parameters must be between 0 and 65535 in lib/OpenQA/WebAPI/Controller/API/V1/Job.pm line 133
Start date:
2019-06-21
Due date:
% Done:
0%
Estimated time:
Description
Observation¶
This nearly killed my email client, from o3 monitoring in /var/log/openqa:
[2019-06-21T09:25:50.0548 UTC] [error] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: number of parameters must be between 0 and 65535 [for Statement "SELECT me.job_id, me.asset_id, me.created_by, me.t_created, me.t_updated, asset.id, asset.type, asset.name, asset.size, asset.checksum, asset.last_use_job_id, asset.fixed, asset.t_created, asset.t_updated FROM jobs_assets me JOIN assets asset ON asset.id = me.asset_id WHERE ( job_id IN ( ?, … ) )" with ParamValues: 1='934057', 2='775775', 3='774972', 4='852279', 5='937661', 6='957555', 7='924633', 8='869768', 9='889133', 10='865729',… 80516='740865'] at /usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/API/V1/Job.pm line 133
Problem¶
Looks like one of the reasons why people preferred to ditch sqlite which couldn't handle more than 5k jobs, postgres's limit seems to be at 216 ;)
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/API/V1/Job.pm#L133 is within the method "list" trying to iterative over the assets of jobs:
132: my $jas = $schema->resultset('JobsAssets')->search({job_id => {in => [keys %jobs]}}, {prefetch => ['asset']});
133: while (my $ja = $jas->next) {
Actions