Comments (9)
Thanks for the error report @xgess (I know I've corresponded with you already, but wanted to respond publicly here as well).
We are currently working to improve our advanced search and transaction searching features, as we are seeing timeouts occur occasionally on merchants with larger volume. This is the error that appears in the Ruby library when your search times out.
We are currently working to improve the performance time, but at the moment regrettably the best option is to catch this error, and retry the request.
-Matt
from braintree_ruby.
Support,
We're currently experiencing this issue three days running. Can you update us on any performance problems that you are seeing?
Jason
from braintree_ruby.
I'm also affected by this. I found the "catch this error and retry" strategy to not be viable, since many of the formerly-working search requests now fail every single time.
My current workaround is to search using id.starts_with
for each of [23456789bcdfghjk]
and then to merge the results locally. This is also regrettable (since it causes sixteen times as many search requests for Braintree to handle), but at least this way transaction searches actually work.
from braintree_ruby.
This is a hilarious workaround, but thank you very much @willglynn. We will implement this. I only hope @braintree and @braintreeps are embarrassed that this is what their users are reduced to.
from braintree_ruby.
The best part is, id.starts_with
works for arbitrary search terms and it's completely scalable. Did a search error out? Split it into sixteenths! Wait, now three of those failed? Split them into sixteenths! The braintree
gem could even do this transparently and by default -- expect a pull request. Let searches multiply like broomsticks!
Seriously though, if transaction fetches can cause timeouts, that's a problem. The API should be able to return a partial result set in a timely fashion along with whatever pagination information is needed to continue processing. DynamoDB does exactly this in order to keep both clients and servers busy. I don't know this would take a protocol revision or what -- but I do know that Braintree::Transaction.search
calls that have been in production for months are now failing due to the issue described here.
from braintree_ruby.
Thanks @willglynn, much appreciated. Any feedback on the underlying issue from @braintree @braintreeps ?
from braintree_ruby.
I'm still running with my 16 sub-request approach, but if you'd prefer the normal logic with a split-things-in-half retry strategy, that's available in #56 or via your Gemfile
:
gem "braintree", github: "willglynn/braintree_ruby", branch: "the_sorcerers_apprentice"
I sincerely hope no one uses this. My expectation is that Braintree will do something to actually solve this issue on a permanent basis, e.g. #55 -- but at any rate, I never want to see this error in my logs again.
from braintree_ruby.
Hey @willglynn, @jtordway, @xgess,
We're aware of this issue and are working on a fix. Specifically, we plan on two separate changes:
- Adding additional indices to these particular relations. This search query in particular is unusually slow.
- Switching to a faster XML generator.
We had planned on doing the database work today, but there's another maintenance operation going on so we've decided to hold off until Monday at the earliest. The XML generator change will likely be deployed next week.
We're also considering adjusting the way we paginate search requests to decrease the likelihood of a timeout. However, we don't plan on adding any support for partial results at this time.
We apologize for the slow response here. One of our development teams is currently working on general improvements to our search functionality, so look for more speedups in the future.
Katelyn and Lionel
Braintree Developers
from braintree_ruby.
I'm happy that the cause of this particular slowness is being addressed. That said, this is a pattern: #40, #46, #51 shows this same issue popping up every few months for different reasons. I really don't want to come back to this in March when we hit another bottleneck, and that's why I'm pushing for better timeout behavior.
from braintree_ruby.
Related Issues (20)
- Report
- Use a generic HTTP library like Faraday HOT 2
- Wrong error code constants HOT 3
- LoadError: cannot load such file -- rexml/document in Ruby 3.0.1 HOT 2
- I don't access some fields in transaction.paypal_details HOT 1
- Don't log timestamp twice HOT 2
- Add customer_id to Subscription fields HOT 2
- The client does not handle uncompressed http response HOT 3
- Raised "expected :plan or :errors" exception when trying to create a new plan with missing mandatory fields HOT 3
- Braintree::ConfigurationError when testing LocalPayment Webhooks HOT 1
- Braintree::OAuthGateway#revoke_access_token ErrorResult is used in an invalid way HOT 2
- Apple Pay Card does not expose Cardholder Name HOT 3
- Possible ReDos in the AddressGateway class HOT 3
- Create transaction returns 422 in logs but no errors HOT 2
- payment_receipt and global_id attributes not accessible HOT 5
- The braintree_ruby 3.4.x incompatibility with libxml-ruby 5.x HOT 3
- Customer `payment_methods` fails because `@sepa_sepa_direct_debit_accounts` HOT 1
- Billing address not working for Google pay card
- Feature Request: Convert Braintree::Transaction to hash with all response fields
- Men's & Women's clothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braintree_ruby.