throttling

Service too busy error in WCF

淺唱寂寞╮ 提交于 2019-11-30 00:11:38
问题 I intermittently get the following exception in my .Net WCF Service. "The HTTP service located at http://MyServer/TestWCF/MyService.svc is too busy." Am I missing something here? Am using basic http binding and have enabled WCF throttling. <basicHttpBinding> <binding name="BasicHttpBinding_MyService" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-16" sendTimeout="00:01:00" > <readerQuotas maxStringContentLength="2147483647" maxArrayLength="163840000" maxDepth=

Limiting/throttling the rate of HTTP requests in GRequests

淺唱寂寞╮ 提交于 2019-11-29 21:47:19
I'm writing a small script in Python 2.7.3 with GRequests and lxml that will allow me to gather some collectible card prices from various websites and compare them. Problem is one of the websites limits the number of requests and sends back HTTP error 429 if I exceed it. Is there a way to add throttling the number of requests in GRequestes so that I don't exceed the number of requests per second I specify? Also - how can I make GRequestes retry after some time if HTTP 429 occurs? On a side note - their limit is ridiculously low. Something like 8 requests per 15 seconds. I breached it with my

Ways to throttle ajax requests

早过忘川 提交于 2019-11-29 19:47:15
问题 I'm using the following code (written by another user) to throttle ajax requests in a livesearch function: JSFiddle if you prefer a demo: http://jsfiddle.net/4xLVp/ It seems buggy, though. Clearing values with Ctrl+shift+back-arrow , and typing again causes a flurry of requests. Blank values also cause a request. It dones't seem right, especially compared to jQuery UI autocomplete, where request delays seem more measured. $('##tag-search').keyup(function() { var elem = $(this); if (elem.val()

Throttling requests by IP address on Apache? [closed]

蹲街弑〆低调 提交于 2019-11-29 14:45:34
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to throttle requests to my web server so as to thwart web scraping and denial of service attacks against my site. I'm willing to be relatively lax, the key thing is that no one requests so much so as to slow things down. I was thinking of setting up throttling by IP address, so that requests from a given

Throttling in Bokeh application

夙愿已清 提交于 2019-11-29 09:49:51
I have Bokeh application with a Slider widget that uses the Slider.on_change callback to update my graphs. However, the slider updates come in much faster than my callback function can handle so I need a way to throttle the incoming change requests. The problem is very prominent since the slider calls into the callback during sliding, while only the last slider value (when the user releases the mouse) is of interest. How could I tackle this problem? UPDATE for Bokeh 1.2 As of Bokeh 1.2, the callback policy applies to both JS callbacks as well as Python callbacks on the server. The value

Throttle pandas apply, when using an API call

╄→尐↘猪︶ㄣ 提交于 2019-11-29 05:17:33
I have a large DataFrame with an address column: data addr 0 0.617964 IN,Krishnagiri,635115 1 0.635428 IN,Chennai,600005 2 0.630125 IN,Karnal,132001 3 0.981282 IN,Jaipur,302021 4 0.715813 IN,Chennai,600005 ... and I've written the following function to replace the address with the longitude and latitude coordinates of the address: from geopy.geocoders import Nominatim geo_locator = Nominatim(user_agent="MY_APP_ID") def get_coordinates(addr): location = geo_locator.geocode(addr) if location is not None: return pd.Series({'lat': location.latitude, 'lon': location.longitude}) location = geo

How to use throttle or debounce with React Hook?

橙三吉。 提交于 2019-11-29 01:28:16
I'm trying to use the throttle method from lodash in a fonctionnal component, e.g.: const App = () => { const [value, setValue] = useState(0) useEffect(throttle(() => console.log(value), 1000), [value]) return ( <button onClick={() => setValue(value + 1)}>{value}</button> ) } Since the method inside useEffect is redeclared at each render, the throttling effect does not work. Does anyone have a simple solution ? you may(and probably need) useRef to store value between renders. Just like it's suggested for timers Something like that const App = () => { const [value, setValue] = useState(0) const

WCF Service Throttling

点点圈 提交于 2019-11-28 20:35:33
Lets assume that I'm dealing with a service that involves sending large amounts of data. If I implement this with WCF, will WCF throttle the service based on how much memory each request takes to serve? Or will I be getting continuous out of memory exceptions each time I receive a large number of hits to my service? I'm quite curious as to dealing with this problem outside of WCF, I'm still a bit new to service development... While using the binding attributes and readerQuotas like Andrew Hare suggests will allow for essentially an unlimited size for most practical uses, keep in mind that the

WCF Concurrent requests piling up on the server when using WSHttpBinding

一世执手 提交于 2019-11-28 20:19:52
I have a WCF client/server app which is communicating over HTTP using the WSHttpBinding. Server Setup : self-hosting, using the standard WCF ServiceHost . My actual service class is attributed as: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession, UseSynchronizationContext = false)] Client Setup : using a visual-studio generated client proxy using synchronous service calls ( proxy.call_server_method blocks until such time as the server has responded in full.) Scenario : I have one particular method call which takes 20 seconds to

What is the best way to implement a rate-limiting algorithm for web requests?

ぃ、小莉子 提交于 2019-11-28 15:49:09
Possible/partial duplicates: What’s a good rate limiting algorithm? Throttling method calls to M requests in N seconds Best way to implement request throttling in ASP.NET MVC? I am looking for the best way to implement a moving time window rate limiting algorithm for a web application to reduce spam or brute force attacks. Examples of use would be "Maximum number of failed login attempts from a given IP in the last 5 minutes", "Maximum number of (posts/votes/etc...) in the last N minutes". I would prefer to use a moving time window algorithm, rather than a hard reset of statistics every X