throttling

WCF stops responding after about 10 or so calls (throttling)

为君一笑 提交于 2019-11-27 00:14:07
问题 I have a WCF Service and an application with a Service Reference to it, and with the application I have a loop and in each iteration it's making a call to a method in this wcf web-service. The problem is that after about 9 calls or so, it just stops...and if you hit Pause button of VS, you will see that it's stuck on the line where it makes the call. After some time waiting for it, this TimeoutException is thrown: The request channel timed out while waiting for a reply after 00:00:59.9970000.

Throttle and queue up API requests due to per second cap

好久不见. 提交于 2019-11-27 00:09:52
问题 I'm use mikeal/request to make API calls. One of the API's I use most frequently (the Shopify API). Recently put out a new call limit, I'm seeing errors like: Exceeded 6.0 calls per second for api client. Slow your requests or contact support for higher limits. I've already gotten an upgrade, but regardless of how much bandwidth I get I have to account for this. A large majority of the requests to the Shopify API are within async.map() functions, which loop asynchronous requests, and gather

Throttling CPU/Memory usage of a Thread in Java?

左心房为你撑大大i 提交于 2019-11-26 23:59:44
问题 I'm writing an application that will have multiple threads running, and want to throttle the CPU/memory usage of those threads. There is a similar question for C++, but I want to try and avoid using C++ and JNI if possible. I realize this might not be possible using a higher level language, but I'm curious to see if anyone has any ideas. EDIT: Added a bounty; I'd like some really good, well thought out ideas on this. EDIT 2: The situation I need this for is executing other people's code on my

Powershell Throttle Multi thread jobs via job completion

偶尔善良 提交于 2019-11-26 22:07:12
问题 All the tuts I have found use a pre defined sleep time to throttle jobs. I need the throttle to wait until a job is completed before starting a new one. Only 4 jobs can be running at one time. So The script will run up 4 and currently pauses for 10 seconds then runs up the rest. What I want is for the script to only allow 4 jobs to be running at one time and as a job is completed a new one is kicked off. Jobs are initialised via a list of servers names. Is it possible to archive this?

Tools for degrading my network connection? [closed]

限于喜欢 提交于 2019-11-26 19:46:06
问题 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 5 years ago . I've written some applications than heavily use network, and I would like to test it over a slow network. I'm looking for a tool to simulate these kind of connections. I'm only interested in Windows tools. 回答1: I've used Traffic Shaper XP on my XP dev box at work. It seems to handle any connection (not just HTTP

How can I debounce a method call?

↘锁芯ラ 提交于 2019-11-26 18:06:51
问题 I'm trying to use a UISearchView to query google places. In doing so, on text change calls for my UISearchBar , I'm making a request to google places. The problem is I'd rather debounce this call to only request once per 250 ms in order to avoid unnecessary network traffic. I'd rather not write this functionality myself, but I will if I need to. I found: https://gist.github.com/ShamylZakariya/54ee03228d955f458389 , but I'm not quite sure how to use it: func debounce( delay:NSTimeInterval,

Bandwidth throttling in C#

假装没事ソ 提交于 2019-11-26 16:11:02
问题 I am developing a program that continually sends a stream of data in the background and I want to allow the user to set a cap for both upload and download limit. I have read up on the token bucket and leaky bucket alghorhithms, and seemingly the latter seems to fit the description since this is not a matter of maximizing the network bandwidth but rather being as unobtrusive as possible. I am however a bit unsure on how I would implement this. A natural approach is to extend the abstract

Throttling method calls to M requests in N seconds

时光毁灭记忆、已成空白 提交于 2019-11-26 14:51:45
I need a component/class that throttles execution of some method to maximum M calls in N seconds (or ms or nanos, does not matter). In other words I need to make sure that my method is executed no more than M times in a sliding window of N seconds. If you don't know existing class feel free to post your solutions/ideas how you would implement this. I'd use a ring buffer of timestamps with a fixed size of M. Each time the method is called, you check the oldest entry, and if it's less than N seconds in the past, you execute and add another entry, otherwise you sleep for the time difference.

javascript/jquery - add debounce to a button

為{幸葍}努か 提交于 2019-11-26 13:53:55
问题 I want to add a debounce to a button, but i want to perform some actions each time user clicks button, but only after 5 second after user hits button, then perform SQL update. Usually the throttle seems to be applied directly to the listener. Here I want some actions performed each time the button is clicked, and then an update after a reasonable waiting period. I am not sure how to use the function in this case... reference: http://code.google.com/p/jquery-debounce/ $('#myButton').click

WCF Service Throttling

点点圈 提交于 2019-11-26 13:18:18
问题 I have a WCF service deployed in a console app with BasicHTTPBinding and SSL enabled. The following attribute is set as well: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] I have also set the throttling behavior to <serviceThrottling maxConcurrentCalls="2147483647" maxConcurrentSessions="2147483647" maxConcurrentInstances="2147483647" /> On the other hand I have created a test client (for load test) that initiates multiple clients