timeout

I need help setting .NET HttpWebRequest timeout

戏子无情 提交于 2019-12-23 18:00:25
问题 My objective is to get the answer from up to 6000 Urls in the shortest time. It was working very well (12 seconds for 5200 LAN Addresses) until some delay started to happen. My code uses up to 20 simultaneous HttpWebRequest.BeginGetResponse with ThreadPool.RegisterWaitForSingleObject for timeout handling. However some (up to 4 in 5,000) of the requests never hit the TimeoutCallback function with the second parameter (timedOut) true, and they waste 5 minutes of my precious time until they hit

rxjs created observable timeout always errors

主宰稳场 提交于 2019-12-23 17:33:32
问题 ok, so now I'm really puzzled. Executing the following code const created = Rx.Observable.create(observer => { observer.next(42) }) const ofd = Rx.Observable.of(42) const createSub = name => [ val => console.log(`${name} received ${val}`), error => console.log(`${name} threw ${error.constructor.name}`) ] created .timeout(100) .subscribe( ...createSub('created') ) ofd .timeout(100) .subscribe( ...createSub('ofd') ) Prints "created received 42" "ofd received 42" "created threw TimeoutError" I

lambda python dynamodb write gets timeout error

浪尽此生 提交于 2019-12-23 16:36:57
问题 I have been trying to work through my first tutorial on lambda dynamodb connections and am running into a timeout error. In the lambda console I have the following code: from __future__ import print_function import json import boto3 print('Loading function') def lambda_handler(event, context): dynamodb = boto3.resource('dynamodb', region_name='us-east-1', endpoint_url="http://localhost:8000") print('Dynamodb loaded') pages_table = dynamodb.Table('Pages') print('Pages table referenced') for

RPC Timeout in Cassandra

一曲冷凌霜 提交于 2019-12-23 16:28:11
问题 I get the following error: cqlsh:dev> SELECT DISTINCT id FROM raw_data; Request did not complete within rpc_timeout. This is a special query that I'll never make again, I don't care how long it takes, and I don't want to change my schema (since I'll never make the query again...). How can I increase rpc_timeout for this one query? I have tried adding LIMIT 9999 and ALLOW FILTERING , and it doesn't help. I expect less than 1000 rows in the result. The query works on another Cassandra cluster

Android: Process has died - low resources?

六月ゝ 毕业季﹏ 提交于 2019-12-23 13:57:10
问题 I've a little problem with a simple HTTP GET request that I've written and which will request a URL every X minutes. I had it once or twice a day that the process stopped in the midst of the GET request. Here's an example of the debug log: 12-07 16:29:22.650 V/TAG(11655): Executing HTTP Request 12-07 16:29:25.336 D/dalvikvm(11655): GC_CONCURRENT freed 366K, 50% free 2824K/5639K, external 0K/0K, paused 3ms+3ms 12-07 16:29:25.526 D/dalvikvm(11655): GC_CONCURRENT freed 450K, 52% free 2825K/5767K

Node PostgreSQL timeout a query by the client

若如初见. 提交于 2019-12-23 12:38:10
问题 I'm using Node package pg for postgres (here): npm i pg var pg = require('pg'); I'm querying a large cluster which is not owned by me, and under certain conditions may fail. Failure may be bad response which is easy to handle or endless query. Please note I can not introduce changes [config or otherwise] on the DB side. Is there any way to set a timeout for query time? I'd like my client to give up after a set time, and return timeout error. Couldn't find anything as such in the docs. Thanks

Best approach to Timeout using HttpWebRequest.BeginGetResponse

瘦欲@ 提交于 2019-12-23 12:06:42
问题 HttpWebRequest.BeginGetResponse doesn´t respect any Timeout properties from HttpWebRequest(Timeout or ReadWriteTimeout). I read some approaches to get the same results, but I don't know if it's the best way to do it and if I should use for few calls or I can scale it inside loops(I am doing a webcrawler). The important thing is, initially my code isn´t async, I just need async because my method should accept a CancellationToken. My concern is about WaitHandles and ThreadPool

Using IErrorHandler and TCP Message Security causes a timeout

天大地大妈咪最大 提交于 2019-12-23 11:53:22
问题 I have a WCF service with a custom IServiceBehavior attached used to return a specific fault on the client side. When I enable this code with TCP Message Security I receive a service timeout. Below you can see the full client and server code to reproduce the error. Server code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.ServiceModel

Timeouting a while loop in Linux shell script

若如初见. 提交于 2019-12-23 11:02:46
问题 This works fine (infinite loop): $ while TRUE; do printf ".";done ............................................................................. I am trying to timeout this while loop with the timeout command. All these don't work: $ timeout 5 while TRUE; do printf ".";done $ timeout 5 "while TRUE; do printf ".";done" $ timeout 5 "while TRUE; do printf \".\";done" $ timeout 5 $(while TRUE; do printf ".";done) $ timeout 5 $('while TRUE; do printf ".";done') What is the correct way (if it exists

Timeouting a while loop in Linux shell script

孤者浪人 提交于 2019-12-23 11:02:15
问题 This works fine (infinite loop): $ while TRUE; do printf ".";done ............................................................................. I am trying to timeout this while loop with the timeout command. All these don't work: $ timeout 5 while TRUE; do printf ".";done $ timeout 5 "while TRUE; do printf ".";done" $ timeout 5 "while TRUE; do printf \".\";done" $ timeout 5 $(while TRUE; do printf ".";done) $ timeout 5 $('while TRUE; do printf ".";done') What is the correct way (if it exists