Yuki Kakegawa
07/16/2025, 6:18 AMevent_invitee endpoint. It was running fine until the end of June, when we start getting a long-hanging job. After looking through the logs, we found that it says it freed memory more than allocated. We think that's what's causing the error. But if you could help look through this log, that would be helpful:
2025-07-16 054442 replication-orchestrator > Setting up destination...
2025-07-16 054442 replication-orchestrator > Setting up replication worker...
2025-07-16 054442 replication-orchestrator > starting state flush thread for connectionId bdf8e399-f564-42f6-a967-93d2223fc683
2025-07-16 054442 replication-orchestrator > Using ClosableLinkedBlockingQueue
2025-07-16 054442 replication-orchestrator > Using ClosableLinkedBlockingQueue
2025-07-16 054442 replication-orchestrator > Running replication worker...
2025-07-16 054442 replication-orchestrator > start sync worker. job id: 35965 attempt id: 0
2025-07-16 054442 replication-orchestrator >
2025-07-16 054442 replication-orchestrator > ----- START REPLICATION -----
2025-07-16 054442 replication-orchestrator >
2025-07-16 054442 replication-orchestrator > Number of Resumed Full Refresh Streams: {0}
2025-07-16 054442 replication-orchestrator > Reading messages from protocol version 0.2.0
2025-07-16 054442 replication-orchestrator > Running destination...
2025-07-16 054442 replication-orchestrator > Writing messages to protocol version 0.2.0
2025-07-16 054442 replication-orchestrator > Reading messages from protocol version 0.2.0
2025-07-16 054442 replication-orchestrator > Starting workload heartbeat
2025-07-16 054442 replication-orchestrator > readFromSource: start
2025-07-16 054442 replication-orchestrator > Starting source heartbeat check. Will check threshold of 10800 seconds, every 1 minutes.
2025-07-16 054442 replication-orchestrator > processMessage: start
2025-07-16 054442 replication-orchestrator > writeToDestination: start
2025-07-16 054442 replication-orchestrator > readFromDestination: start
2025-07-16 054443 destination > INFO main i.a.i.d.b.BigQueryDestinationKt(main):565 Starting Destination : class io.airbyte.integrations.destination.bigquery.BigQueryDestination
2025-07-16 054443 destination > INFO main i.a.c.i.b.IntegrationCliParser$Companion(parseOptions):144 integration args: {catalog=/dest/catalog.json, write=null, config=/dest/connectorConfig.json}
2025-07-16 054443 destination > INFO main i.a.c.i.b.IntegrationRunner(runInternal):130 Running integration: io.airbyte.integrations.destination.bigquery.BigQueryDestination
2025-07-16 054443 destination > INFO main i.a.c.i.b.IntegrationRunner(runInternal):131 Command: WRITE
2025-07-16 054443 destination > INFO main i.a.c.i.b.IntegrationRunner(runInternal):132 Integration config: IntegrationConfig{command=WRITE, configPath='/dest/connectorConfig.json', catalogPath='/dest/catalog.json', statePath='null'}
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword group - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword order - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword display_type - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword airbyte_secret - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword always_show - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > WARN main c.n.s.UnknownKeywordFactory(lambda$getKeyword$0):37 Unknown keyword groups - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
2025-07-16 054443 destination > INFO main i.a.i.d.b.BigQueryUtils(getLoadingMethod):217 Selected loading method is set to: STANDARD
2025-07-16 054444 destination > INFO main i.a.i.b.d.t.CatalogParser(parseCatalog):132 Running sync with stream configs: [StreamConfig(id=StreamId(finalNamespace=calendly, finalName=event_invitees, rawNamespace=airbyte_internal, rawName=calendly_raw__stream_event_invitees, originalNamespace=calendly, originalName=event_invitees), postImportAction=DEDUPE, primaryKey=[ColumnId(name=uri, originalName=uri, canonicalName=uri)], cursor=Optional[ColumnId(name=created_at, originalName=created_at, canonicalName=created_at)], columns={ColumnId(name=id, originalName=id, canonicalName=id)=STRING, ColumnId(name=uri, originalName=uri, canonicalName=uri)=STRING, ColumnId(name=name, originalName=name, canonicalName=name)=STRING, ColumnId(name=email, originalName=email, canonicalName=email)=STRING, ColumnId(name=event, originalName=event, canonicalName=event)=STRING, ColumnId(name=status, originalName=status, canonicalName=status)=STRING, ColumnId(name=timezone, originalName=timezone, canonicalName=timezone)=STRING, ColumnId(name=tracking, originalName=tracking, canonicalName=tracking)=Struct(properties={}), ColumnId(name=cancel_url, originalName=cancel_url, canonicalName=cancel_url)=STRING, ColumnId(name=created_at, originalName=created_at, canonicalName=created_at)=STRING, ColumnId(name=updated_at, originalName=updated_at, canonicalName=updated_at)=STRING, ColumnId(name=old_invitee, originalName=old_invitee, canonicalName=old_invitee)=STRING, ColumnId(name=rescheduled, originalName=rescheduled, canonicalName=rescheduled)=BOOLEAN, ColumnId(name=cancellation, originalName=cancellation, canonicalName=cancellation)=Struct(properties={reason=STRING, created_at=STRING, canceled_by=STRING, canceler_type=STRING}), ColumnId(name=reschedule_url, originalName=reschedule_url, canonicalName=reschedule_url)=STRING, ColumnId(name=scheduled_event_id, originalName=scheduled_event_id, canonicalName=scheduled_event_id)=STRING, ColumnId(name=text_reminder_number, originalName=text_reminder_number, canonicalName=text_reminder_number)=STRING, ColumnId(name=questions_and_answers, originalName=questions_and_answers, canonicalName=questions_and_answers)=Array(items=Struct(properties={answer=STRING, position=NUMBER, question=STRING}))}, generationId=3, minimumGenerationId=0, syncId=35965)]kapa.ai
07/16/2025, 6:18 AMFreed more memory than allocated (with negative byte values) is a known symptom in Airbyte jobs that hang, particularly with the BigQuery destination. This has been reported in multiple issues, such as [Infinite synchronisation - negativ memory allocation](https://github.com/airbytehq/airbyte/issues/42109) and [Sync hangs forever, saying nothing to do](https://github.com/airbytehq/airbyte/issues/58082). - In these cases, the job often appears to be stuck in a loop, repeatedly logging that it is freeing memory or flushing states, but not making progress or processing records. - The root cause is not always clear, but it is often related to either: - A bug in the destination connector's memory management or buffer handling. - An upstream issue where the source or destination process exits unexpectedly or fails to deliver/receive messages, causing the replication worker to hang. - In some cases, users have reported that upgrading Airbyte and connectors, increasing resource limits, or cleaning up persistent storage (like MinIO) can help, but these are not guaranteed fixes for this specific negative memory allocation symptom. What you can do: 1. Upgrade Airbyte and Connectors: Ensure you are running the latest version of Airbyte and the BigQuery connector, as some memory management bugs have been fixed in newer releases. 2. Check Resource Allocation: While not always the root cause, insufficient memory or CPU can exacerbate these issues. Try increasing the resources allocated to your Airbyte jobs and destination containers. 3. Review Buffer/Queue Logs: If you see repeated logs with negative memory allocation or zero records processed, it is likely the job is stuck and will not recover without intervention. 4. Check for Upstream Errors: Sometimes, the source connector or the network/API can cause the destination to hang if it does not receive expected data or state messages. 5. Open an Issue: If the problem persists after upgrading and adjusting resources, consider opening a GitHub issue with detailed logs, as this may be a connector or platform bug that requires engineering attention. Summary: The "Freed more memory than allocated" message and hanging sync are known issues, particularly with the BigQuery destination. They are likely related to a bug in memory management or message handling in the connector. Upgrading, increasing resources, and cleaning up storage may help, but if the issue persists, it should be reported to the Airbyte team for further investigation. There is no definitive fix documented in the knowledge sources, so further debugging or escalation may be necessary if the problem continues [Infinite synchronisation - negativ memory allocation](https://github.com/airbytehq/airbyte/issues/42109) [Sync hangs forever, saying nothing to do](https://github.com/airbytehq/airbyte/issues/58082).