timeout

Connections will not close when using Transaction Binding=Explicit Unbind; in connection string

I´m using Transaction Binding=Explicit Unbind in the connection string as recommended here since I´m also using TransactionScope with timeout. The problem is that the connections does not seem to close after being disposed and eventually there are no more connections available in the connection pool. I got the same result when I modified...

Timeout jQuery effects

I am trying to have an element fade in, then in 5000 ms fade back out again. I know I can do something like: setTimeout(function(){ $(".notice").fadeOut() }, 5000); But that will only control the fade out, would I add the above on the callback? ...

Network Outage Causes Stored Procedure Querying Across DB Link to Hang Forever

A number of stored procedures I support query remote databases over a WAN. The network occasionally goes down, but the worst that ever happened was the procedures failed and would have to be restarted. The last couple weeks it's taken a sinister turn. Instead of failing the procedures hang in a wierd locked state. They can't be kille...

Avoid connection timeout when using multiple threads and connection pool

I'm splitting up a readonly database operation into multiple chunks, (Each of which reads a subset of a very large amount of data, analyzes it and writes the results to a disk file). Each chunk performs a Select (into a datatable) on a new .net thread (using a delegate and BeginInvoke) There are more subsets of the data than there are ...

Python, Popen and select - waiting for a process to terminate or a timeout

I run a subprocess using: p = subprocess.Popen("subprocess", stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdid=subprocess.PIPE) This subprocess could either exit immediately with an error on stderr, or keep running. I want to detect either of these condition...

How do I fix a .NET Webservice timeout causing a UnsupportedMediaException in a Java client?

I currently have a .net SOAP web service with a timeout on the request that I set using Server.ScriptTimeout = TIME_OUT; I then have java client calling said web service. However when the timeout is reached I get this exception: Exception in thread "Thread-9" com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: ...

Managing database connectivity with ADO.NET

We have an application that is built upon ADO.NET. We follow some simple best practices that allow us to make use of the connection pool. For example, a block of code that is using a database might look something like this: using( DbConnection dbConnection = GetDatabaseConnection() ) { doWork(); } FWIW, there's nothing spec...

How to find unclosed connection? Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I've had this problem before and found that basically I've got a connection that I'm not closing quickly enough (leaving connections open and waiting for garbage collection isn't really a best practice). Now I'm getting it again but I can't seem to find where I'm leaving my connections open. By the time is see the error the database has...

How to simulate keybard input to a remote desktop session?

Found my own answer. If someone could copy/paste it into an answer so i can mark it as the answer, and answer this question, to take it off the unanswered list - i would appreciate it. i'm trying to send fake keyboard input to an application that's running in a Remote Desktop session. i'm using: Byte key = Ord("A"); keybd_event(key,...

Compact Framework - Timeout function for locking UI after period of inactivity

Good morning, I am the developer of a medium sized PDA application that will be used out on the streets. The PDA will contain some vaguely sensitive data (names and addresses, etc). The encryption on the mobile database is already handled, however if someone got hold of the PDA whilst it was logged in they could happily go through the d...

For a web application, how to close all the related browser windows when session is timed out / user signs out?

Suppose user has opened my web application in many different browser windows. After sometime he is timed out / sign out from the application. I want to close all the related browser windows. How can we handle this? (I think GMAIL does that) ...

Future.get() and InterruptedException Asynchronous threading

Im using asynchronous threading in my application WITH httpClient. I make a call using the Future Api like so mStrResults = (String) rssFuture.get(); this call attempts to retrieve an html string returned from my Callable httpClient call() method. What i want to do however is ensure that the get method does not wait too long while ...

What happens when WebClientProtocol Timeout occurs

Hi All, We have a client application that has reference to a webservice. We had set the timeout property on the webclientprotocol object to 50 (ms) and wanted to observe what goes on. We tied up a long running webmethod that returns a huge DataSet to the client. When the default value was there, the DataSet was returned properly to th...

How to keep a php script from timing out because of a long mysql query

I have an update query being run by a cron task that's timing out. The query takes, on average, five minutes to execute when executed in navicat. The code looks roughly like this. It's quite simple: // $db is a mysqli link set_time_limit (0); // should keep the script from timing out $query = "SLOW QUERY"; $result = $db->query($query...

Ruby timeout for Python?

Does anyone know a good solution for implementing a function similar to Ruby's timeout in Python? I've googled it and didn't really see anything very good. Thanks for the help. Here's a link to the Ruby documentation http://www.ruby-doc.org/stdlib/libdoc/timeout/rdoc/index.html ...

I need help setting .NET HttpWebRequest timeout

My objective is to get the answer from up to 6000 Urls in the shortest time. It was working very well (12 seconds for 5200 LAN Addresses) until some delay started to happen. My code uses up to 20 simultaneous HttpWebRequest.BeginGetResponse with ThreadPool.RegisterWaitForSingleObject for timeout handling. However some (up to 4 in 5,000...

PHP: How to set a timeout on socket_read?

I was wondering how can I set a timeout on a socket_read call? The first time it calls socket_read, it waits till data is sent, and if no data is sent within 5 secs I want to shutdown the connection. Any Help? I already tried "SO_RCVTIMEO" with no luck. Im creating a socket with socket_create() and listening on it for connections, then ...

Increase request timeout for a thread in CFML

I have a web application that is generating hundreds of PDFs in batch, using ColdFusion 8 on a Windows/IIS server. The process runs fine on my development and staging servers, but of course the client is cheap and is only paying for shared hosting, which isn't as fast as my dev/staging boxes. As a result, PDF generation threads are timi...

Web Service not caring about Timeout property

I'm using an automatically created (with wsdl.exe and the GUI-based "Add web reference" command) web service for LyricWiki.org. However, since my internet connection is sucking lately, it's been taking ages to complete and is annoying me. I'm trying to make it timeout in 2000ms by using the .Timeout property, but it still hangs. I also ...

Induce WCF openTimeout closeTimeout

I wish to test and observe timeout behaviours between a WCF client and service host. For receiveTimeout and sendTimeout, it is probably easy to transmit a large byte stream that takes more than a few seconds and set those timeout attributes to ridiculously low values. However, since there is nothing that can be done beyond the calling o...