Open FranzBusch opened 3 years ago
This might have been caused by not having enough memory. We bumped our instance size up and are monitoring if any more crashes occur.
Thank you for keeping us updated. We'll try to replicate it as well.
Some updates here:
Initially we ran XCMetrics including the Postgres DB + Redis on a T2.Micro (1 vCPU, 1 GiB memory). We saw crashes happening very frequently (every 10 minutes). We also saw out of memory errors in the logs and decided to upgrade
We resized the instance to a T2.Medium now (2 vCPU, 4 GiB memory) and see a much stabler performance. The instance crashed once in a 24h hour window. The crash is now a different one which does not look like a memory crash but rather a crash inside the XCLogParser
.
0x7f4c95e7697f
0x7f4c96c59270
0x7f4c96c592b1
0x7f4c96bfe124
0x7f4c9699876a
0x7f4c96c04bd5
0x7f4c969f8200
0x7f4c9654d9d4
0x7f4c964b5cfe
0x7f4c964ad4d4
0x7f4c964b8840
0x562cf022a488, function signature specialization <Arg[1] = Dead> of XCLogParser.LogLoader.loadFromURL(Foundation.URL) throws -> Swift.String at /build/.build/checkouts/xclogparser/Sources/XCLogParser/loglocation/LogLoader.swift:29
0x562cf020922c, XCLogParser.LogLoader.loadFromURL(Foundation.URL) throws -> Swift.String at /build/<compiler-generated>:0
0x562cf020922c, XCLogParser.ActivityParser.parseActivityLogInURL(_: Foundation.URL, redacted: Swift.Bool, withoutBuildSpecificInformation: Swift.Bool) throws -> XCLogParser.IDEActivityLog at /build/.build/checkouts/xclogparser/Sources/XCLogParser/activityparser/ActivityParser.swift:50
0x562cf02d0804, function signature specialization <Arg[6] = Dead> of static XCMetricsBackendLib.LogParser.parseFromURL(_: Foundation.URL, machineName: Swift.String, projectName: Swift.String, userId: Swift.String, userIdSHA256: Swift.String, isCI: Swift.Bool) throws -> XCMetricsBackendLib.BuildMetrics at /build/Sources/XCMetricsBackendLib/UploadMetrics/LogProcessing/LogParser.swift:52
0x562cf02d13a5, static XCMetricsBackendLib.LogParser.parseFromURL(_: Foundation.URL, machineName: Swift.String, projectName: Swift.String, userId: Swift.String, userIdSHA256: Swift.String, isCI: Swift.Bool) throws -> XCMetricsBackendLib.BuildMetrics at /build/<compiler-generated>:0
0x562cf02d13a5, function signature specialization <Arg[3] = Dead> of static XCMetricsBackendLib.MetricsProcessor.process(metricsRequest: XCMetricsBackendLib.UploadMetricsRequest, logURL: Foundation.URL, redactUserData: Swift.Bool) throws -> XCMetricsBackendLib.BuildMetrics at /build/Sources/XCMetricsBackendLib/UploadMetrics/LogProcessing/MetricsProcessor.swift:13
0x562cf02c0ef2, static XCMetricsBackendLib.MetricsProcessor.process(metricsRequest: XCMetricsBackendLib.UploadMetricsRequest, logURL: Foundation.URL, redactUserData: Swift.Bool) throws -> XCMetricsBackendLib.BuildMetrics at /build/<compiler-generated>:0
0x562cf02c0ef2, closure #1 () -> () in XCMetricsBackendLib.ProcessMetricsJob.dequeue(Queues.QueueContext, XCMetricsBackendLib.UploadMetricsRequest) -> NIO.EventLoopFuture<()> at /build/Sources/XCMetricsBackendLib/UploadMetrics/Jobs/ProcessMetricsJob.swift:68
0x562cef66ad0d, reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () at /build/<compiler-generated>:0
0x7f4c95481406
0x7f4c9548cc28
0x7f4c9548d8cd
0x7f4c95495521
0x7f4c95e6b6da
0x7f4c9407671e
0xffffffffffffffff
Since it only happened once I don't think it is critical right now but we will keep monitoring it.
@ecamacho We have a lot of jobs now that are in the DB marked as running
during which XCMetrics crashed. Is there an easy way to re-queue them?
Interesting, not currently. We'll take a look, we may add one
We started to see this crash quite often as increased the number of people reporting, so It may be resource-related.
How big can be your .xcactivitylog file? Also, do you know if your project has a lot of Warnings or Notes? In https://github.com/spotify/XCMetrics/issues/30 they are having memory-related issues due to a big number of notes in their logs
It probably about 6Mb. As for warnings, about 120+ Warnings. Well bump the specs a bit and keep you posted.
Hi there, I have similar issues with 2mb in size. What's the recommended specs?
I tried with smaller project and it works.
We are seeing a crash happening quite frequently which happens inside the Postgres stack. I am trying to investigate further where this crash is coming from.
The crash log: