timeout

Why timeout may occur in SqlConnection.Open()?

故事扮演 提交于 2019-12-22 05:16:27
问题 What are the cases when timeout occurs in SqlConnection.Open()? On one of our IIS boxes 10 seconds after AppProcess was recycled the following exception appeared: Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Source : .Net SqlClient Data Provider Help link : Errors : System.Data.SqlClient

Connection in RabbitMQ server auto lost after 600s

佐手、 提交于 2019-12-22 04:39:09
问题 I'm using rabbitMQ server with amq. I am having a difficult problem. After leaving the server alone for about 10 min, the connection is lost. What could be causing this? 回答1: The default connection timeout for the RabbitMQ connection factory is 600 seconds (at least in the Java client API), hence your 10 minutes. You can change this by specifying to the connection factory your timeout of choice. It is good practice to ensure your connection is release and recreated after a specific amount of

catch/3 and call_with_time_limit/2 predicates in SWI-Prolog

北慕城南 提交于 2019-12-22 04:35:47
问题 I want to use catch(:Goal, +Catcher, :Recover) where Goal is call_with_time_limit(+Time, :Goal) It's messed up and I can't find the right way to know when one of the above happened: 1) Goal stopped because of time out. 2) Goal failed (it's suppose to fail sometimes). I tried: (catch(call_with_time_limit(Time, Goal), Catcher, Recover) -> (ground(Catcher), Catcher = time_limit_exceeded), **TIMEOUT ACTIONS**) ; (**SUCCESS ACTIONS**)) ; **FAILURE ACTIONS** ) * EDIT * Pattern: I use the following

Set a timeout for a specific function / block of code (not the whole script)?

▼魔方 西西 提交于 2019-12-22 04:16:26
问题 I have php scripts that call perl scripts to do various things and sometimes I get it where it just goes on and on without getting a response back, this is based on the variable that is being passed to the perl script and I am doing a lot of different ones in succession so I can't get really debug it directly since I don't have a response from perl... I would really like to just be able to set a php function or block of code to timeout after a certain number of seconds.. I have been searching

rxjs timeout to first value

ⅰ亾dé卋堺 提交于 2019-12-22 04:11:22
问题 so as I understood from this question here I understood that timeout operator errors if an observable does not emit any value in the given window of time... the problem for me is, that this window of time resets after each emit, making it necessary to complete the sequence if you are only interested if the first value(s) emit within the window... is there a nice way to have a "timeout to first"? Other than .take(1).timeout(1000) ? 回答1: In addition to @Maxime's answer, you can use race to

rxjs timeout to first value

流过昼夜 提交于 2019-12-22 04:10:36
问题 so as I understood from this question here I understood that timeout operator errors if an observable does not emit any value in the given window of time... the problem for me is, that this window of time resets after each emit, making it necessary to complete the sequence if you are only interested if the first value(s) emit within the window... is there a nice way to have a "timeout to first"? Other than .take(1).timeout(1000) ? 回答1: In addition to @Maxime's answer, you can use race to

Pausing a method for set # of milliseconds

喜你入骨 提交于 2019-12-22 01:27:34
问题 I need to do a sort of "timeout" or pause in my method for 10 seconds (10000 milliseconds), but I'm not sure if the following would work as i do not have multi-threading. Thread.Sleep(10000); I will try to use that current code, but I would appreciate if someone could explain the best and correct way of doing this, especially if the above code does not work properly. Thanks! UPDATE : This program is actually a console application that in the function in question is doing many HTTPWebRequests

Basicdatasource connection time out problem (using mysql)

假如想象 提交于 2019-12-22 01:19:33
问题 I am using BasicDatasource in my application. This application is processing huge amount of raw data. Sometimes 1 query can take more than 15 minutes. (using mysql as db) Here is my question, I acquire a connection from pool, then execute several queries on it. But when I use the same connection more than 15 minutes, I get the error below. In the mysql server max_wait is set to 180 hours so it shouldn t be a problem to keep the connection alive and no firewall rule set to kill connections

How to call two alternating functions in a loop every 5 minutes in JavaScript?

白昼怎懂夜的黑 提交于 2019-12-22 01:19:20
问题 Acknowledging that the setTimeout() method is asynchronous and therefore starting with this: for (var i = 1; i <= 3; i++) { (function(i) { setTimeout(function() { console.log(i + " second(s) elapsed"); }, i * 1000); })(i); } I'd like to replace console.log() with something to the effect of window.open("https://www.twitter.com","_self") or document.getElementById("myFirstID").click(); and window.open("https://www.facebook.com","_self") or document.getElementById("mySecondID").click(); , called

Good timeout for heartbeating proto using TCP - Java Sockets

两盒软妹~` 提交于 2019-12-22 01:15:54
问题 Im implementing my own proto in Java, it will use a heartbeat over a TCP connection that I also use to transfer messages and files. For the client I am using blocking socket I/O. So here is how Im planning that will work... I will set the socket timeout for K seconds and make the heartbeat stay sending messages in an interval T, so that T < K. If the timeout expires, looks like the server is offline for the client, or vice-versa. The heartbeat is the server sending a String and the Client