woofwoofW
Convex Community3y ago
3 replies
woofwoof

"Log line is too long" on seemingly simple query on small table.

Hey gang! Our team is absolutely loving building on top of convex. We are actually in the process of moving our entire application/business onto the platform.

I am having an unusual issue though today. Out of seemingly nowhere (said every developer ever) a function that was working has stopped. I traced it down to the following query but cannot figure out what the issues is.

const ga = await ctx.db.query("group_attributes").take(16);

and here is the "group_attributes" table schema:

group_attributes: defineTable({ organization_id: v.id("organizations"), name: v.string(), parent_group_id: v.id("groups"), ref_group_id: v.optional(v.id("groups")), type: v.string(), meta: v.optional(v.any()), }).index("by_organization_id_parent_group_id", [ "organization_id", "parent_group_id", ]),

I have stripped verything else out of the parent funciton to the above query and even stripped the query down to its most basic form (removed indexes then filters to just "take" becasue collect() was erroring out). The query works if take is set to 15 but errors out for anything greater.

The corresponding "group_attriubtes" table only has 97 documents in it so I have a hard time seeing how this could be timeout related. Plus, putting other queries before it in the function (which would theoretically decrease the time available to run the query) do not effect the take(15) cutoff.

The query shows the following error in the convex logs:
failure Uncaught Error: Log line is too long (4224 > maximum length 4096) at handler (../convex/blocks.ts:47:11)


I have been troubleshooting this all morning and it's starting to push other tasks back... so naturally I figured I would ask the experts.
Was this page helpful?