<@U04S8PLJWMT> I have setup a posthog to bigquery ...
# ask-ai
j
@kapa.ai I have setup a posthog to bigquery connection, I'm wondering if I'm being ratelimited or if my setup is not correct. It looks to be getting stuck every 10,000 records. As well as when I look in my big query there seems to be only 60k records when it says 150k has been received on airbyte
k
Based on the information from your question and the knowledge sources: 1. Rate Limiting: The PostHog API does enforce rate limits, especially on analytics endpoints like retrieving persons or events. The limits are 240 requests per minute and 1200 per hour for analytics endpoints, and these limits apply to your entire PostHog team, not just a single API key. If you exceed these, you will be rate limited, and Airbyte will display an informational message and pause syncing until the rate limit resets. You may also see HTTP 429 errors in your logs if this is happening. Airbyte will automatically retry once the rate limit is lifted, but if you are consistently hitting these limits, syncs may be slow or incomplete [PostHog source docs](https://docs.airbyte.com/integrations/sources/posthog#posthog), [Cloud troubleshooting](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/review-connection-status#connection-troubleshooting). 2. Batch Size and Sync Speed: There is a known issue with the PostHog connector where the batch size (
limit
parameter) is set to 100 by default, which can make syncing large datasets inefficient. There have been discussions and issues raised about increasing this batch size to improve sync speed, but as of the latest information, the default may still be low, causing many API calls and potentially hitting rate limits faster [Forum discussion](https://discuss.airbyte.io/t/3511). 3. Records Missing in BigQuery: If Airbyte reports receiving 150k records but only 60k appear in BigQuery, this could be due to: - Sync jobs being interrupted or failing partway due to rate limits or other errors. - Issues with the destination connector (BigQuery) not committing all received records, possibly due to batching or job failures. - The sync process getting "stuck" after a certain number of records, which has been reported in other connectors as well [Github issue](https://github.com/airbytehq/airbyte/issues/45119). What you can do: - Check the Airbyte UI for any rate limit warnings or errors during your syncs. - Review the sync logs for HTTP 429 errors or messages about rate limiting. - Consider increasing the batch size if possible, but be aware this may increase the risk of hitting rate limits. - If you see syncs getting stuck at 10,000 records, this may be a connector or configuration issue—review logs for errors at that point. - Ensure your BigQuery destination is not encountering its own rate limits or errors. If you continue to see discrepancies or stuck syncs, you may want to open an issue with detailed logs, as this could be a bug or require connector updates. Let me know if you need help interpreting specific log messages or want guidance on adjusting connector settings!
j
Well we are using posthog self hosted and we upped the ratelimits
@kapa.ai
k
Sorry @James Ash, I'm not sure what you mean. Please try again. 👋
j
@kapa.ai Well we are using posthog self hosted and we upped the ratelimits, if the ratelimit would be on bigquery how would i check that?
k
A message from kapa.ai
If you suspect that BigQuery is rate limiting your Airbyte syncs, the best way to check is to review the Airbyte sync logs for errors or warnings related to rate limits. Specifically, look for messages such as: - "Exceeded rate limits: too many api requests per user per method for this user_method" This is a typical error message when BigQuery rate limits are hit. The logs may also reference HTTP 429 errors or similar rate limit indicators. For example, one user reported this exact error when syncing a large number of connections to BigQuery [Destination BigQuery - Exceeded rate limits](https://github.com/airbytehq/airbyte/issues/22482). - Sync Job Failures or Retries If Airbyte encounters rate limits, the sync may fail or retry. However, in some cases, Airbyte may not automatically retry after a BigQuery rate limit error, and the sync will fail instead. What to do: - Open the Airbyte UI, go to the connection, and review the sync history and logs for any rate limit-related errors. - If you see errors like the one above, it confirms BigQuery is rate limiting your requests. - If you do not see such errors, the issue may be elsewhere (e.g., source-side, configuration, or connector bug). If you are running a large number of syncs or have high data volume, you may need to stagger your sync schedules or optimize your BigQuery usage to avoid hitting these limits. The knowledge sources do not provide detailed steps for checking BigQuery rate limits outside of reviewing Airbyte logs, nor do they mention specific BigQuery-side monitoring tools. If you need more granular monitoring, you may need to consult Google Cloud's BigQuery documentation or monitoring tools directly [Destination BigQuery - Exceeded rate limits](https://github.com/airbytehq/airbyte/issues/22482).