Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Source Zendesk Support/Chat: got stuck after 100k records #12591

Closed
Tracked by #12935
marcosmarxm opened this issue May 5, 2022 · 13 comments · Fixed by #13261
Closed
Tracked by #12935

🐛 Source Zendesk Support/Chat: got stuck after 100k records #12591

marcosmarxm opened this issue May 5, 2022 · 13 comments · Fixed by #13261

Comments

@marcosmarxm
Copy link
Member

Is this your first time deploying Airbyte: No
OS Version / Instance: Ubuntu 20.04
Memory / Disk: 8Gb / 100 GB ssd
Deployment: Docker
Airbyte Version: 0.35.61-alpha
Source name/version: airbyte/source-zendesk-chat:0.1.6 (latest)
Destination name/version: airbyte/destination-bigquery: 1.0.5 (latest)
Step: normal sync.
Description: everytime the process starts to sync it freezes after some hours, the same happens with source-zendesk-support:0.2.3 (latest).

See discussion in Discourse: https://discuss.airbyte.io/t/zendesk-chat-and-zendesk-support-freezes-after-some-hours/455

@RobertoBonnet
Copy link
Contributor

Hello guys. I have a solution for Zendesk Chat

@RobertoBonnet
Copy link
Contributor

RobertoBonnet commented May 18, 2022

TL DR;

I started to debug the connector to Zendesk suport. The problem only affect clients with to much data, indeed.

Some routes requests are mades using asynchronous requests. This work to small data, but the process is stucking everything when the error start for large data.

Searching I have found some changed in Zendesk API that affect this code. The rate limit change for pagination greater than 1000. Here at Hurb we are making some changes:

SatisfactionRatings - Process request by request using cursor-based pagination
TicketMetrics - The cursor-based pagination aren't working here. There is a error in Zendesk DB. To avoid the problem, we are processing request by request applying the rule of 10 request per minute after pagination 1000 using offset-based pagination

@RobertoBonnet
Copy link
Contributor

There is a way to see the error. Just make a request to https://{account}.zendesk.com/api/v2/ticket_metrics.json?page=999999 11 times in a minute

@marcosmarxm
Copy link
Member Author

Thanks @RobertoBonnet to dive into this! Really helpful analysis

@marcosmarxm
Copy link
Member Author

There is a way to see the error. Just make a request to https://{account}.zendesk.com/api/v2/ticket_metrics.json?page=999999 11 times in a minute

Should we add this new request limits to your PR?

@RobertoBonnet
Copy link
Contributor

@marcosmarxm It won't be needed by the tests I performed. The way the data is fetched does not go through this rate limit. I made some changes and I'm processing the full sync. Waiting to see what will happen. 3 days have passed.

image

@bazarnov bazarnov self-assigned this May 24, 2022
@RobertoBonnet
Copy link
Contributor

RobertoBonnet commented May 24, 2022

The task failed :(. Is there any strategy to not lose all the data as downloaded? There are so many data from Zendesk here and, when the task faills, we lost to many time. I'll try to limit the pagination of each router from api that we use incremental.

image

@RobertoBonnet
Copy link
Contributor

RobertoBonnet commented May 24, 2022

logs-428.txt

@marcosmarxm
Copy link
Member Author

The task failed :(. Is there any strategy to not lose all the data as downloaded? There are so many data from Zendesk here and, when the task faills, we lost to many time. I'll try to limit the pagination of each router from api that we use incremental.

image

You must use checkpoint to send data to destination and next time dont need to start from scratch. but only works with incremental streams

@davydov-d davydov-d self-assigned this May 25, 2022
@bazarnov
Copy link
Collaborator

Uploading logs-428.txt…

@RobertoBonnet Please attach the valid logs, since i'm afraid this link leads to other PR - not logs)

@RobertoBonnet
Copy link
Contributor

@bazarnov Sorry... I fixed the link

@bazarnov
Copy link
Collaborator

Similar issue: #12155

@bazarnov bazarnov changed the title Zendesk Support/Chat got stuck after 100k records 🐛 Source Zendesk Support/Chat: got stuck after 100k records May 26, 2022
davydov-d added a commit that referenced this issue May 27, 2022
davydov-d added a commit that referenced this issue May 27, 2022
davydov-d added a commit that referenced this issue May 27, 2022
bazarnov added a commit that referenced this issue May 27, 2022
davydov-d added a commit that referenced this issue May 31, 2022
bazarnov added a commit that referenced this issue May 31, 2022
bazarnov added a commit that referenced this issue May 31, 2022
bazarnov added a commit that referenced this issue Jun 1, 2022
@marcosmarxm
Copy link
Member Author

@RobertoBonnet are you going to work for Zendesk Support too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment