Does file_get_contents() have a timeout setting?

The default timeout is defined by default_socket_timeout ini-setting, which is 60 seconds. You can also change it on the fly: ini_set(‘default_socket_timeout’, 900); // 900 Seconds = 15 Minutes Another way to set a timeout, would be to use stream_context_create to set the timeout as HTTP context options of the HTTP stream wrapper in use: $ctx … Read more

Session timeout in ASP.NET

Are you using Forms authentication? Forms authentication uses it own value for timeout (30 min. by default). A forms authentication timeout will send the user to the login page with the session still active. This may look like the behavior your app gives when session times out making it easy to confuse one with the … Read more

How can I tell when HttpClient has timed out?

I am reproducing the same issue and it’s really annoying. I’ve found these useful: HttpClient – dealing with aggregate exceptions Bug in HttpClient.GetAsync should throw WebException, not TaskCanceledException Some code in case the links go nowhere: var c = new HttpClient(); c.Timeout = TimeSpan.FromMilliseconds(10); var cts = new CancellationTokenSource(); try { var x = await … Read more

NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream

This happens because your upstream takes too long to answer the request and NGINX thinks the upstream already failed in processing the request, so it responds with an error. Just include and increase proxy_read_timeout in location config block. Same thing happened to me and I used 1 hour timeout for an internal app at work: … Read more

Change Volley timeout duration

See Request.setRetryPolicy() and the constructor for DefaultRetryPolicy, e.g. JsonObjectRequest myRequest = new JsonObjectRequest(Method.GET, url, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Log.d(TAG, response.toString()); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d(TAG, “Error: ” + error.getMessage()); } }); myRequest.setRetryPolicy(new DefaultRetryPolicy( MY_SOCKET_TIMEOUT_MS, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));

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

To increase the phpMyAdmin Session Timeout, open config.inc.php in the root phpMyAdmin directory and add this setting (anywhere). $cfg[‘LoginCookieValidity’] = <your_new_timeout>; Where <your_new_timeout> is some number larger than 1800. Note: Always keep on mind that a short cookie lifetime is all well and good for the development server. So do not do this on your … Read more

How to set connection timeout with OkHttp

As of OkHttp3 you can do this through the Builder like so client = new OkHttpClient.Builder() .connectTimeout(10, TimeUnit.SECONDS) .writeTimeout(10, TimeUnit.SECONDS) .readTimeout(30, TimeUnit.SECONDS) .build(); You can also view the recipe here. For older versions, you simply have to do this OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(15, TimeUnit.SECONDS); // connect timeout client.setReadTimeout(15, TimeUnit.SECONDS); // socket timeout Request … Read more

What is the difference between connection and read timeout for sockets?

What is the difference between connection and read timeout for sockets? The connection timeout is the timeout in making the initial connection; i.e. completing the TCP connection handshake. The read timeout is the timeout on waiting to read data1. If the server (or network) fails to deliver any data <timeout> seconds after the client makes … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)