天道酬勤,学无止境

timeout

Named-pipe reading timeout

I'm trying to set a timeout to the reading operation of my named pipe. In order to read from the named pipe, I'm using the ReadFile function. I read that a timeout can be set for this function with the SetCommTimeouts function but when I try to use it, I get system error 1: "Incorrect function". Here is my code (this is the client side): m_pipe = CreateFileA(pipeName, // pipe name GENERIC_READ | // read and write access GENERIC_WRITE, 0, // no sharing NULL, // default security attributes OPEN_EXISTING, // opens existing pipe 0, // default attributes NULL); // no template file if (m_pipe !=

2022-01-19 01:07:34    分类:问答    c++   windows   timeout   named-pipes

golang get massive read tcp ip:port i/o timeout in ubuntu 14.04 LTS

I wrote a golang program which run well in the past several months in ubuntu 12.04 LTS until I upgraded it to 14.04 LTS My program is focused on sending HTTP requests which send about 2-10 HTTP requests per second. The HTTP request address vary. When the problem occurs, first, some of the requests shows read tcp [ip]:[port]: i/o timeout, then after several minutes all requests show read tcp [ip]:[port]: i/o timeout, not any request can be sent. I restart the program, everything become right again. All of our servers(2 server) have such problem after upgraded from 12.04 to 14.04 I create new

2022-01-18 21:33:17    分类:问答    http   tcp   go   timeout   ubuntu-14.04

Timeout Error - Sending mail through SQL Mail - Service Broker Queue

This is my first question! So I hope I provide enough information: We are attempting to send around 1000 emails by taking advantage of the SQL Mail Service Broker. We are relatively new to this, but have hit a wall with this problem: Some Background: We created a Profile, an Account and a ProfileAccount entries, and enable database mail. We then tested with a few emails and all worked fine. We then created a store procedure that we would call from our project to QUEUE all the emails using msdb.dbo.sp_send_dbmail. This worked well, and we can see all the mail queued up successfully in msdb.dbo

2022-01-18 12:12:21    分类:问答    sql   timeout   service-broker

How to debug a Heroku request timeout error

How would I find out what is causing h12 timeout errors on heroku? It happens randomly on different pages/controllers. This is the error that I get from the logs Processing by UsersController#new as HTML 2013-08-15T13:08:54.718157+00:00 app[web.1]: Started GET "/signup" for 105.226.239.198 at 2013-08-15 13:08:54 +0000 2013-08-15T13:08:54.744390+00:00 app[web.1]: Rendered communal/_error_messages.html.erb (0.6ms) 2013-08-15T13:09:24.714225+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/signup host=www.goodwordlabs.com fwd="105.226.239.198" dyno=web.1 connect=3ms

2022-01-18 09:52:58    分类:问答    ruby-on-rails   heroku   timeout

Timeout for Z3 Optimize

How do you set a timeout for the z3 optimizer such that it will give you the best known solution when it runs out of time? from z3 import * s = Optimize() # Hard Problem print(s.check()) print(s.model()) Follow-up question, can you set z3 to randomized hill climbing or does it always perform a complete search?

2022-01-18 09:49:45    分类:问答    optimization   timeout   z3   z3py   optimathsat

Force timeout on a MysqlQuery from PHP

Is there a way to force Mysql from PHP to kill a query if it didn't return within a certain time frame? I sometimes see expensive queries running for hours (obviously by this time HTTP connection timed out or the user has left). Once enough such queries accumulate it starts to affect the overall performance badly.

2022-01-18 01:13:20    分类:问答    php   mysql   timeout

Android: Process has died - low resources?

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, external 0K/0K, paused 2ms+2ms 12-07 16:29:29.990 I/ActivityManager( 1339): Process PackageName

2022-01-17 06:21:13    分类:问答    android   resources   timeout

Timeout issue when using sql helper(Microsoft.ApplicationBlocks.Data)

I am having timeout issues when dealing with long sql queries, the Dataset which timesout for long queries is : static public DataSet Getxxxx(Guid xxxx) { DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "GetAllxx", new SqlParameter("@productxx", productxx)); return ds; } Where can i set timeout , I am using Microsoft application block version 2.0.

2022-01-17 05:47:22    分类:问答    asp.net   sql-server   database   timeout   SqlHelper

lambda python dynamodb write gets timeout error

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 item in event: print('Item: {}'.format(item)) response = pages_table.put_item( Item=item) print('Response

2022-01-17 04:11:03    分类:问答    python   lambda   timeout   amazon-dynamodb

PHP mysqli 可以在连接尝试时设置超时吗?(Can PHP mysqli set timeout on connect attempt?)

问题 我有这条线可以连接到 MySQL 数据库,只是想知道是否有办法为连接尝试设置超时? $db = new mysqli($server, $usr, $passwd, $dbname); 回答1 是的,您可以为尝试使用 mysqli 从您的 php 程序连接到 MySQL 数据库显式指定超时。 不过,它有点毛茸茸。 当您使用new mysqli()时,您使用的是可重用连接池。 如果要设置超时或任何其他选项,则需要使用real_connect代替,如下所示: $timeout = 30; /* thirty seconds for timeout */ $link = mysqli_init( ); $link->options( MYSQLI_OPT_CONNECT_TIMEOUT, $timeout ) || die( 'mysqli_options croaked: ' . $link->error ); $link->real_connect($server, $usr, $passwd, $dbname) || die( 'mysqli_real_connect croaked: ' . $link->error ); 这里有一个不错的解释:https://php.net/manual/en/mysqli.real-connect.php

2022-01-16 14:54:40    分类:技术分享    php   mysql   mysqli   timeout