Questions tagged [timeout]

The timeout term refers to a predefined period of time allowed to elapse before an event is to occur. Timeout may also refer to an event that takes place after a specified period of time elapses.

A timeout refers to both the process of defining, setting and controlling a predefined interval of time specifically related to executing a process when it has elapsed, as well as the process to execute itself.

A timeout may be cancelled, reset or reconfigured at any time, or allowed to run its course. Timeouts typically run once, although may be reused if the required functionality is required more than once.

In computing a timeout may be used to execute a predefined block of code after a specified amount of time, typically to throttle or control event flow or scope digest.

9712 questions
210
votes
11 answers

How to set connection timeout with OkHttp

I am developing app using OkHttp library and my trouble is I cannot find how to set connection timeout and socket timeout. OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url(url).build(); Response response =…
kelvincer
  • 5,929
  • 6
  • 27
  • 32
209
votes
2 answers

How to set my phpmyadmin user session to not time out so quickly?

I work on my wamp for localhost backend development everyday. I feel annoyed by phpmyadmin auto log out out quickly. Is there any way I could get rid of this or extend the timeout? Where can I set this timeout value?
Jin You
  • 2,328
  • 2
  • 15
  • 19
205
votes
9 answers

Change Volley timeout duration

I use the new Volley framework for Android to do a request to my server. But it timeouts before getting the response, although it does respond. I tried adding this code: HttpConnectionParams.setConnectionTimeout(httpParams,…
Cissmayazz
  • 2,195
  • 3
  • 15
  • 10
201
votes
6 answers

How can I tell when HttpClient has timed out?

As far as I can tell, there's no way to know that it's specifically a timeout that has occurred. Am I not looking in the right place, or am I missing something bigger? string baseAddress = "http://localhost:8080/"; var client = new HttpClient() { …
Benjol
  • 63,995
  • 54
  • 186
  • 268
186
votes
6 answers

Does file_get_contents() have a timeout setting?

I am calling a series of links using the file_get_contents() method in a loop. Each link may take more than 15 minutes to process. Now, I worry about whether PHP's file_get_contents() has a timeout period? If yes, it will time out with a call and…
Flora Clinton
  • 1,871
  • 2
  • 11
  • 3
182
votes
15 answers

Session timeout in ASP.NET

I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following Set in web.config. Set session timeout to 60…
klone
  • 2,005
  • 2
  • 16
  • 18
182
votes
45 answers

Waiting for Target Device to Come Online

I recently updated to Android Studio 2.3, and now when I try to run the application, the emulator does not come online. It times out after 300 seconds. Additionally, The app has been experiencing a FATAL EXCEPTION ERROR (OOM), and I am not sure how…
MMurph23
  • 1,833
  • 2
  • 9
  • 4
175
votes
7 answers

How to set timeout for http.Get() requests in Golang?

I'm making a URL fetcher in Go and have a list of URLs to fetch. I send http.Get() requests to each URL and obtain their response. resp,fetch_err := http.Get(url) How can I set a custom timeout for each Get request? (The default time is very long…
pymd
  • 4,021
  • 6
  • 26
  • 27
175
votes
12 answers

Spring RestTemplate timeout

I would like to set the connection timeouts for a rest service used by my web application. I'm using Spring's RestTemplate to talk to my service. I've done some research and I've found and used the xml below (in my application xml) which I believe…
sardo
  • 2,731
  • 3
  • 19
  • 18
173
votes
9 answers

Is it possible to read from a InputStream with a timeout?

Specifically, the problem is to write a method like this: int maybeRead(InputStream in, long timeout) where the return value is the same as in.read() if data is available within 'timeout' milliseconds, and -2 otherwise. Before the method returns,…
JKL
173
votes
11 answers

How to set timeout on python's socket recv method?

I need to set timeout on python's socket recv method. How to do it?
Thoreller
  • 1,731
  • 2
  • 11
  • 3
158
votes
7 answers

Implement C# Generic Timeout

I am looking for good ideas for implementing a generic way to have a single line (or anonymous delegate) of code execute with a timeout. TemperamentalClass tc = new TemperamentalClass(); tc.DoSomething(); // normally runs in 30 sec. Want to error…
chilltemp
  • 8,854
  • 8
  • 41
  • 46
149
votes
13 answers

How to put a delay on AngularJS instant search?

I have a performance issue that I can't seem to address. I have an instant search but it's somewhat laggy, since it starts searching on each keyup(). JS: var App = angular.module('App', []); App.controller('DisplayController', function($scope,…
braincomb
  • 1,636
  • 2
  • 11
  • 11
147
votes
26 answers

phpmyadmin logs out after 1440 secs

In my local development Ubuntu box I use MySQL and phpmyadmin to work with the database. Whenever phpmyadmin is idle for 1440 secs (24min) the session expires. I lose my place and have to login and start over. I tried changing the…
sandeep
  • 3,061
  • 11
  • 35
  • 54
145
votes
6 answers

Timeout command on Mac OS X?

Is there an alternative for the timeout command on Mac OSx. The basic requirement is I am able to run a command for a specified amount of time. e.g: timeout 10 ping google.com This program runs ping for 10s on Linux.
sheki
  • 8,991
  • 13
  • 50
  • 69