connection-timeout

Help troubleshooting SqlException: Timeout expired on connection, in a non-load situation

折月煮酒 提交于 2019-11-27 17:27:31
I have a server hosting a website of mine that has almost zero-traffic. A few people (< 20) enter the site every day, and a few RSS readers are subscribed to some feeds we put out. Almost every night, an RSS reader will hit us in the middle of the night and get an exception that the website can't connect to the SQL Server because of a Timeout in the connection. The details are extremely weird, so I'm looking for some help on what could be the issue, since I don't know where to start looking anymore. We are using ASP.Net MVC, Entity Framework, and SQL Server 2008 over Windows Server 2008. The

How long will the browser wait after an ajax request?

拜拜、爱过 提交于 2019-11-27 10:14:01
问题 How long can the browser wait before an error is shown before server answers for request? Can this time be unlimited? 回答1: If you are using a jQuery $.ajax call you can set the timeout property to control the amount of time before a request returns with a timeout status. The timeout is set in milliseconds, so just set it to a very high value. You can also set it to 0 for "unlimited" but in my opinion you should just set a high value instead. Note: unlimited is actually the default but most

Connection with MySql is being aborted automatically. How to configure Connector/J properly?

廉价感情. 提交于 2019-11-27 09:17:55
问题 I read this advice from error message: You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. I'm using Spring and JPA. Where should I configure Connector/J? (in persistence.xml , or in entityManagerFactory spring configuration, or in dateSource spring configuration, or somewhere else?) 回答1: The

Will “Always On” setting prevent BOTH idleTimeout and periodicRestart?

丶灬走出姿态 提交于 2019-11-27 09:15:16
Has you may know, Web sites hosted under Microsoft Azure Web Sites service are by default configure to timeout after idling 20 minutes (idleTimeout) and the application pool to restart every 29 hours (periodicRestart). This cause the web site to be slow for the first user accessing it. I would like to know if the new "Always On" setting available on standard mode will prevent both situation from happening. I found a few articles mentioning the feature, they are all very clear that the idle timeout will be avoided but none of them explicitly talks about the periodic restart: One of the other

curl timeout less than 1000ms always fails?

*爱你&永不变心* 提交于 2019-11-27 06:47:43
问题 This code always fails (i.e., $result is Boolean false ): $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_NOBODY, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $curl_version = curl_version(); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 999); $result = curl_exec($ch); curl_close($ch); This code always succeeds (i.e., $result is a string containing the header): $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,

Retrofit and OkHttpClient, catch connection timeout in failure method

☆樱花仙子☆ 提交于 2019-11-27 03:34:34
I have the following setup: final OkHttpClient okHttpClient = new OkHttpClient(); okHttpClient.setReadTimeout(5, TimeUnit.SECONDS); okHttpClient.setConnectTimeout(5, TimeUnit.SECONDS); RestAdapter.Builder builder = new RestAdapter.Builder() .setEndpoint(ROOT) .setClient(new OkClient(okHttpClient)) .setLogLevel(RestAdapter.LogLevel.FULL); I am trying to handle the situation in which my server is down and the user gets a connection timeout exception, this is my logging: java.net.SocketTimeoutException: failed to connect to /192.168.0.53 (port 3000) after 5000ms Full logging: http://pastebin.com

MySQL Workbench: How to keep the connection alive

北城以北 提交于 2019-11-27 00:10:45
Error Code: 2013. Lost connection to MySQL server during query I am using MySQL Workbench. Also, I am running a batch of inserts, about 1000 lines total (Ex. INSERT INTO mytable SELECT * FROM mysource1; INSERT INTO mytable SELECT * FROM mysource2;...mysource3...mysource4 multiplied 1000 times) Each batch takes a considerable amount of time, some of them, more than 600 seconds. How can I configure workbench, to continue working overnight, without stopping and without losing the connection? Ignacio From the now unavailable internet archive: Go to Edit -> Preferences -> SQL Editor and set to a

HttpClient execute keeps giving ConnectTimeoutException

邮差的信 提交于 2019-11-26 21:40:41
问题 I have this very big bug in my application that I really can't seem to solve. Whenever I make a rest call via the following code: HttpGet request = new HttpGet(url + getParams()); HttpParams httpParameters = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, 5000); HttpConnectionParams.setSoTimeout(httpParameters, 10000); DefaultHttpClient httpClient = new DefaultHttpClient(httpParameters); httpClient.execute(request); I get the error in DDMS: 07-15 11:22:47.448:

PHP file_get_contents ignoring timeout?

半腔热情 提交于 2019-11-26 21:31:47
问题 $url = 'http://a.url/i-know-is-down'; //ini_set('default_socket_timeout', 5); $ctx = stream_context_create(array( 'http' => array( 'timeout' => 5, 'ignore_errors' => true ) ) ); $start = microtime(true); $content = @file_get_contents($url, false, $ctx); $end = microtime(true); echo $end - $start, "\n"; the response I get is generally 21.232 segs, shouldn't be about five seconds??? Uncommenting the ini_set line don't help at all. 回答1: You are setting the read timeout with socket_create_context

Volley RequestQueue Timeout

本秂侑毒 提交于 2019-11-26 19:14:38
问题 RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext()); mRequestQueue.add(new JsonObjectRequest(Method.GET, cityListUrl, null, new Listener<JSONObject>() { public void onResponse(JSONObject jsonResults) { //Any Call } }, new ErrorListener() { public void onErrorResponse(VolleyError arg0) { //Any Error log } } )); This is my Request Call and i want to change or set timeout for the request . Is it possible anyway ?? 回答1: You should set the request's RetryPolicy: myRequest