Closed JustinDSN closed 3 years ago
Yes, that a limitation in the NIO Postgres driver. We did some workarounds to be able to insert batches of some entities like notes and steps that we found in our tests that are easy to get over that limit. I think in your case, the issue is the number of targets. That is one list we did not apply our workaround and it may be causing it. Let me change that so you can test if it solves your issue.
Can you try with the latest main
branch? We just merged a potential fix
Thanks for the quick turnaround @ecamacho! I tried the latest ‘main’ branch with the same file, and while I got further (the same error didn’t happen), the file was never imported.
XcmetricsServer memory usage went up to about 5.5 gb, and the finished parsing log message was posted to the console, but no other successful messages were posted to the console.
I left the server running for several hours and no further messages about the status of the job were logged.
Any idea how to best trouble shoot this hanging behavior, or where to look next?
Hi @JustinDSN were you running the backend in MacOS or in Linux?
I think the issue is the amount of notes you have in your build (~376k). I will try to reproduce it locally.
I was checking and we run our Backend pods with 4G in RAM and 2 cores, meaning that we can parse 2 logs in parallel per pod.
When attempting to upload an XCActivityLog that is rather large (29.1 MB) with many targets, and many steps, XCMetrics logs an error:
[ ERROR ] Uncaught error: NIOPostgres error: protocol error: Bind count must be <= 32767.
A Google search for that error pointed me to: https://github.com/vapor/fluent-kit/issues/277. It seems to be related to the number of parameters that are being bound to a given query.
Here is what the breakpoint looks like after the log is parsed in the
insert
method of thePostgreSQLMetricsRepository
struct.Here is the raw log output: