Introduction + question (I thought I understood throttling, but I don't...)
"Fabrizio Giudici" <[email protected]> Tue, 14 Apr 2015 14:24:11 +0200
| Newsgroups | gmane.comp.audio.musicbrainz.devel |
|---|---|
| Organization | Tidalwave s.a.s. |
| Message-ID | <op.xw20qloe2ilaq7@localhost> |
Sorry for my late answer, but I somewhat lost the original reply, got it now on the web archive... > > Your requests are exceeding the allowable rate limit (150.4, limit is > > 22.0 per 20 seconds) > > > > I'm not understanding the first number. > It should list the number of requests within the period, so that's 150.4 > requests in 20 seconds. Ahh... thanks. I was reading "150 requests per second, limit is 22.0 per 20 seconds". Pretty dumb on me, but it's what I understood :-) > During the period where you're getting 503s, I do in fact see a large > number of requests with both "blueMarine2" and "blueMarine2-1" > useragents -- 7 or 8 per second, which is consistent with 150 requests > in 20 seconds. The requests it seems to be making at > that time are for recordings, and it seems that at least some are > multiple requests for the same entity (e.g., three requests in a row for > /ws/2/recording/b061125b-28c6-40fc-9239-11fb0260695a?inc=artists). ... > Some things I'd check: > a.) Is your code multithreaded such that it might make simultaneous > requests? It is, in the sense that the whole processing code is actor-based for parallel local processing. There is a throttle applied to code which connects to MB, but it is clearly flawed. > b.) Were you perhaps running two instances (blueMarine2 and > blueMarine2-1 presumably not being the same instance of your software) Yes, sorry, I was messing around with the User Agent trying to put a version number in it. > d.) If you're really stumped, you could try installing a local copy of > the server ( https://bitbucket.org/metabrainz/musicbrainz-server/ ) or > install our VM and make requests against that, checking the logs > yourself. I have patched a http connection library so it can be forced to used a local cache. I didn't try it yet with MB (but it is ok with DbTune), so it should resolve my problem in future. The large number of accesses is due to some integration tests that run periodically. With the cache, they can run completely on my side. > For the record, I'm using the user agent "blueMarine". > > We'd appreciate if you'd read > https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#Provide_meaningful_User-Agent_strings > for advice on a better user-agent string as well, but perhaps you > simply haven't gotten to that stage of your development :) I added my email to the line. Actually at the beginning of the month it was the very first code. > Please let me know. Thanks. I'll check my throttling code and let you know. -- Fabrizio Giudici - Java Architect @ Tidalwave s.a.s. "We make Java work. Everywhere." http://tidalwave.it/fabrizio/blog - [email protected]