timeout

Android: connection timeout not working (connection waits forever)

倖福魔咒の 提交于 2019-12-18 12:41:52
问题 I have an application that connects to a server. I set a timeout, disconnected the device from internet and tried to execute the post request to see if the timeout was called, but the connection keeps waiting forever. This is my code: private static final int TIMEOUT_OPS = 3000 ; private HttpClient mHttpClient; public String sendToken(String token) throws IOException, AuthenticationException { JSONArray jsonData = new JSONArray(); jsonData.put(token); final HttpPost post = prepareJSONRequest

Is it safe to set a high close timeout on socket.io?

蓝咒 提交于 2019-12-18 12:28:54
问题 I have a web application where the user needs to be constantly connected. By default, socket.io will disconnect the connection after 60 seconds. I have 'reconnection' turned on though, so it is essentially closing and reopening the connection every minute. This can cause issues with feeds/notifications to my connected clients. Would it be safe to set this timeout to lets say, 10 minutes, or possibly higher? Is there a reason it is so low right now? 回答1: My guess is that you may be

Failed to install due to Timeout in Emulator

萝らか妹 提交于 2019-12-18 12:14:43
问题 When attempting to install an .apk from Eclipse, whether to an android emulator or to a physical device (via USB), I get a "Failed to install *.apk on device '*': timeout" error. The .apk is not found on the emulator nor physcial device (Samsung Galaxy S2, rooted). If I avoid eclipse, and just use the command line, I'm also unable to install an .apk. Why a new post on this? There are several other stackoverflow posts that reference the "Failed to install..." error. I've created a new post for

Handling Web Service Timeouts While Performing Long-Running Database Tasks

冷暖自知 提交于 2019-12-18 11:27:38
问题 The architecture of one of our products is a typical 3-tier solution: C# client WCF web service SQL Server database The client requests information from the web service. The web service hits the database for the information and returns it to the client. Here's the problem. Some of these queries can take a long, long time, and we don't know up-front which ones will be slow. We know some that are often slower than others, but even the simplest requests can be slow given enough data. Sometimes

python MySQLDB query timeout

筅森魡賤 提交于 2019-12-18 10:52:40
问题 I'm trying to enforce a time limit on queries in python MySQLDB. I have a situation where I have no control over the queries, but need to ensure that they do not run over a set time limit. I've tried using signal.SIGALRM to interrupt the call to execute, but this does not seem to work. The signal gets sent, but does not get caught until after the call to execute finishes. I wrote a test case to prove this behavior: #!/usr/local/bin/python2.6 import time import signal from somewhere import get

How to setup a connection timeout depending of the user login in MySQL

血红的双手。 提交于 2019-12-18 10:36:11
问题 I have currently more than 100 connections in Sleep state. Some connection must stay in Sleep state (and don't close) because it's permanent connection but some others (with a different user name) are from some php script and I want them to timeout very fast. Is it possible to setup a wait_timeout per user? and if yes, How? 回答1: There's no per-user timeout configuration, but you can set the wait_timeout value dynamically. That is, after you make a connection as a given user, you can issue a

How do I create a password that timeouts after certain period of time in batch file?

牧云@^-^@ 提交于 2019-12-18 09:49:27
问题 I want to make this code to ask for a password that timeouts after 10 seconds and if you wrote the correct password it goes to :wow but if it's incorrect it just continues the code . (the code is just an example) @ECHO OFF TIMEOUT /t 10>nul exit :wow echo now this is fun! pause exit 回答1: MD5sum Batch scripts, as they live in the world of plain text files, aren't very conducive to storing and matching passwords. After all, the person running the script could just as easily open it in Notepad

NSMutableURLRequest timeout doesn't trigger if data starts to load but not webViewDidFinishLoad

落花浮王杯 提交于 2019-12-18 09:12:39
问题 I am loading a UIWebview and requesting a URL that can take some time to finish loading. The request starts and begins to receive data. However, it doesn't appear that the request finishes. The webViewDidFinishLoad never triggers nor does the webView didFailLoadWithError: callback. Does a timeout of a NSURLRequest only occur if there is no response receiving data or does it trigger if the request doesn't complete in that interval as well? If it's the former, is there an elegant solution to

Stored Procedure failing on a specific user

ぐ巨炮叔叔 提交于 2019-12-18 08:55:19
问题 I have a Stored Procedure that is constantly failing with the error message "Timeout expired," on a specific user. All other users are able to invoke the sp just fine, and even I am able to invoke the sp normally using the Query Analyzer--it finishes in just 10 seconds. However with the user in question, the logs show that the ASP always hangs for about 5 minutes and then aborts with a timeout. I invoke from the ASP page like so " EXEC SP_TV_GET_CLOSED_BANKS_BY_USERS '006111' " Anybody know

Jetty Websocket IdleTimeout

雨燕双飞 提交于 2019-12-18 08:53:21
问题 I've been working on annotated websockets lately, with the Jetty API (9.4.5 release) , and made a chat with it. However i got an issue, after 5 minutes (which i believe is the default timer), the session is closed (it is not due to an error). The only solution I've found yet, is to notify my socket On closing event and reopen the connection in a new socket. However i've read on stackOverflow, that by setting IdleTimeOut in the WebsocketPolicy, i could avoid the issue: I've tried setting to