-
Notifications
You must be signed in to change notification settings - Fork 22
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
Time Out During Requests #10149
Comments
Thank you for taking the time to report a bug. We prioritise bugs depending on the severity and implications, so please ensure that you have provided as much information as possible. If you haven’t already, it really helps us to investigate the bug you have reported if you provide ‘Steps to Replicate’ and any associated screenshots. |
Please feel free to call/email if you need to, this is very urgent our-side due to it being countrywide. |
Any news on this issue? |
Hi @BYMIntegrations - is this a new problem (ie were you querying the same data successfully previously)? Can you give me more information about the requests you are making. I can see in your screenshot above that you aren't using any query string parameters, but is this the case in all scenarios? |
This issue has been updated and moved to our ‘Near Term’ column (typically completed within 0 - 4 months). We have assessed the effort required and outlined a technical specification - please take the time to review this detail. When we're ready to schedule the issue, it will be assigned to the relevant board where you can continue to track its progress to completion. |
hi it is just this customer for only the contact endpoint, we can query other endpoints |
Hi @plittlewood-rpt, Hope you are well. This is regarding customers: Just to confirm the main issue here is we are experiencing a 504 response when making the following request:
For us this is a new customer so we have no experience with this working for us in the past, all other endpoints for this customer that we use seem to be working as expected. This seems to be reproducible 100% of the time. Removing the Changing the Let me know if you have any suggestions. Many Thanks, Henry Fitch |
Hi Henry
I’m not in the office today, however it looks like this is your initial pull. The timeouts are ultimately being caused by slow database queries which stem from the way we need to do the modified filter and sort. On larger databases we sometimes need to step in to add additional indexes etc to make them more performant. As it is an initial pull though, ordering and even querying by modified date probably isn’t even necessary anyway given it looks like you want to pull ALL contacts. If that’s the case, I’d highly recommend only using the modified parameters for subsequently pulls. You will get much better performance sorting by created date and probably omitting the date filter altogether for the initial pull.
I’ll review the performance of the queries as soon as I can next week but the above should unblock you I think
Thanks
Pete
…________________________________
From: BYM - Henry ***@***.***>
Sent: Friday, November 17, 2023 3:03:20 PM
To: reapit/foundations ***@***.***>
Cc: Pete Littlewood ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [reapit/foundations] Time Out During Requests (Issue #10149)
External Message - Please be cautious when opening links or attachments in email
________________________________
Hi @plittlewood-rpt<https://github.com/plittlewood-rpt>,
Hope you are well.
This is regarding customers: CWO-GBTG and ABB-GBTG
Just to confirm the main issue here is we are experiencing a 504 response when making the following request:
[image]<https://user-images.githubusercontent.com/51915903/283839284-9e1b2655-9d5e-4c55-bc08-d61f1e80f510.png>
https://platform.reapit.cloud/contacts?pageSize=100&pageNumber=1&sortBy=-modified&modifiedFrom=1900-01-01T00:00:00Z&fromArchived=false<https://platform.reapit.cloud/contacts?pageSize=100&pageNumber=1&sortBy=-modified&modifiedFrom=1900-01-01T00:00:00Z&fromArchived=false>
This seems to be reproducible 100% of the time. Removing the sortBy parameter doesn't seems to have an affect. Reducing the pageSize parameter to around 10 seems to give a successful response periodically, but given the amount of calls we would need to make (around 100,000) and the response times (10 - 30 seconds) this wouldn't work for us and I wouldn't want to cause any problems on your end.
Let me know if you have any suggestions.
Many Thanks,
Henry Fitch
BriefYourMarket
—
Reply to this email directly, view it on GitHub<#10149 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHK7GI6VWFJNTC23422UROTYE54DRAVCNFSM6AAAAAA7KPTYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGU4DMMRQGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi Pete, Cheers for responding, makes sense and yeh you raise a good point about the full pulls. I'll do some checks our side to make sure we will get the same amount of data without the sort and filter. I can confirm the same endpoint without the filter and sort is returning in about 10 seconds. If all is looking good will get these removed on the full pulls, I can probably looking at removing the sort on the daily pulls as well but I imagine if the database has had to filter them by the modified date it won't take it it much more resource to sort it. Henry |
Thanks Henry. It's likely going to be the quickest solution here (though we will review what's going on). Without getting too deep into it, because you're using a modified from date so far in the past, the database effectively ignores the indexes and ends up doing a near full table scan, hence the time out. When you use a more realistic datetime - as would be the case when you're keeping your dataset up to date after the initial pull - it will use the index as it will get benefit from doing so. |
We've made the changes to this, managed to pull in all of the data besides Landlords. We're hitting the endpoint https://platform.reapit.cloud/landlords/ and it's returning no data for either of the countrywide customer codes we have. Not sure if there's any data available to us, are you able to confirm? |
Hi @BYMIntegrations the CWO and ABB builds don't have any landlords so I presume they don't deal with lettings (at least through our system). |
Hi Pete, I can confirm we have made the recommended changes on our side over the weekend, full pulls are no longer using the Thanks, Henry |
Thanks for confirming. For reference we do have a project in flight to alter how this filter works (there'll be no change to behaviour in terms of the output, but we've made some data layer changes to allow us to query the data more efficiently). This should be starting to rollout fairly soon so you should see better performance more generally when using modifiedFrom/sortBy modified once we get these updates out in the wild. |
With a different customer (YOM), we are seeing a large amount of timeouts, even with the above changes removing the filter and sort. 5,242 / 26,799 Appointments Endpoint (/appointments) returned a 504 error after 4 retries per call. We are also seeing occasional timeouts on the following endpoints: /applicants We are also seem some failures due to incorrect 429 errors, but this issue has been raised on a separate ticket: #10259 Many Thanks, Henry |
It looks like you have commented on a closed issue. If your comment relates to a bug or feature request, please open a new issue, and include this issue number/url for reference. |
Describe the bug
A clear and concise description of what the bug is.
We are having issues when getting data from the Foundations API for a number of accounts relating to Countrywide. These are happening with Contact, Property, Vendor and Applicant. It is resulting in missed data and no contacts being pulled through at all.
The errors we are getting are 504 responses.
Additional context
Add any other context about the problem here.
Applicant_archived_00000001_error504.json
Property_archived_00000001_error504.json
Vendor_archived_00000001_error504.json
Contact_live_00000001_error504.json
Specification
The text was updated successfully, but these errors were encountered: