timeout

How do I enforce a timeout on a webservice call using ksoap 2?

I need to add a timeout to a J2ME application that uses ksoap 2 to connect to a web service. I've tried the method described as a possible pseudo timeout at http://ksoap2.sourceforge.net/doc/api/org/ksoap2/transport/HttpTransport.html, but it doesn't seem to function on this device. I'd run the connection on another thread and kill it ...

read_timeout in Nokogiri?

Hi, I'm fetching some weather data from an online xml doc using Nokogiri, and I would like to set up a timeout for graceful recovery in case the source can't be reached... My google searches show several possible methods for open-uri and Net::HTTP, but none specific to Nokogiri. My attempts to use those methods are failing (not too sur...

How to continue process after responding to ajax request in PHP?

Some operation takes much time, which leads to ajax request to time out, how to I finish responding to the request fisrt, then continue that operation? ...

How can I find out the amount of open sessions programatically in Tomcat using Java?

Is it possible to find out the number of open sessions reliably in Tomcat (i.e. not only the amount of users who have logged in since [current time]-[session time out], but the number of sessions stored on the server)? ...

Simple C/C++ network I/O library

I have the following problem to solve. I want to make a number of requests to a number of "remote" servers (actually, a server farm we control). The connection is very simple. Send a line, and then read lines back. Because of the number of requests and the number of servers, I use pthreads, one for each request. The naive approach, ...

Socket inactivity timeout in java

Hi, I can't find in the socket java API a way to close a inactive connection open for TIMEOUT millisecond. The goal is to avoid an embarassing error when I forget to close the socket explicitly (and force the distant resource to be rebooted). If I don't find a low level method, I will add a last-time-used value to our connection, and ...

Adjusting HttpWebRequest Connection Timeout in C#

I believe after lengthy research and searching, I have discovered that what I want to do is probably better served by setting up an asynchronous connection and terminating it after the desired timeout... But I will go ahead and ask anyway! Quick snippet of code: HttpWebRequest webReq = (HttpWebRequest)HttpWebRequest.Create(url); webReq...

ajax request times out frequently,how to fix?

It seems such things never happened to SO,did they use some special technique? ...

curl retry on timeout.

I've written a shell script that has a function like this: function getpage { echo $1 curl -O "http://www.example.com/$1" -b cookie.txt -s } The problem is if the website times out then that page will be skipped, I need it to re-try if it times out (I will also be putting in a 60 second timeout). How do I do this? ...

Google mini timeouts

Hi there, We use a Google mini to index a client site and when a user does a search we make a HTTP request to the Google mini and get the results back in XML which is processed and displayed to the user. The client has reported a lot of timeouts occurring on on the HTTP requests (we timeout after 10 seconds) and after checking the resu...

python MySQLDB query timeout

I'm trying to enforce a time limit on queries in python MySQLDB. I have a situation where I have no control over the queries, but need to ensure that they do not run over a set time limit. I've tried using signal.SIGALRM to interrupt the call to execute, but this does not seem to work. The signal gets sent, but does not get caught until ...

Tricky delay on mouseover

This is what I have currently: $("#cart-summary").mouseenter(function () { $('.flycart').delay(500).slideDown('fast'); }); $(".flycart").mouseleave(function () { $('.flycart').delay(500).slideUp('fast'); }).find('a.close').click(function(){ $(this).parents('.flycart').hide(); }); What it does is: If mouseover #cart-summary -> op...

Query timeout, depending on dates

Hello, we have some user forms that include a 'period' menu, where the user can request the server to return data for a specific date range, such as "Purchase Orders issued between the 1st and the 10th of October 2008". The logic is then to add "on the fly" the date range to the original sql query and requery the data. The syntax of t...

Problem with handling exception when sending data by ajax with jQuery

hello, i got following part of one of functions if(continiueSend) { $.ajax ({ type: "POST", url: "mailer.php", data: "somestestdata", timeout: 5000, success: function(a) { alert(a); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError);...

How long will my session last?

Hi, Can someone please tell me how long my session will last from the data below? - I'm not sure which one tells me session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_ht...

Is the Timeout directive of Apache overrideable in htaccess or inside of a <VirtualHost>?

I want to override the Timeout configuration of apache, only for one domain. I would prefer to be able to offer the option of overriding it in the htaccess, but manually configuring it in the VirtualHost configuration would be fine too. Is this supposed to work? Thanks. ...

Timeout XMLHttpRequest

How can I add a timeout to the following script... I want it to display text like "Timed Out" var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no) var loadedobjects="" var rootdomain="http://"+window.location.hostname var bustcacheparameter="" function ajaxpage(url, containerid){ var page_r...

Intermittent SQL Server Timeouts and wildly varied execution times for stored procs

I am having a problem with my SQL Server 2005 where stored procs, specifically ones that run Bulk Inserts, are sometimes taking a really long time to execute. This stored proc, let's call it DatabaseUpdate, shold take about 2 secs to complete. However, between 20-40% of the time it takes much more than that and it is very common that i...

.Net Timeouts: WaitForSingleObject vs Timer

I'm implementing a timeout on an asynchronous operation (a series of network IOs), and I'm not sure which is 'better' (from a allocations / performance) perspective: creating an EventWaitHandle and using RegisterWaitForSingleObject, or just creating a Timer and using its Tick. In my specific case the EventWaitHandle is lazy-created, but...

How do I prevent a Request Timeout when uploading a file in PHP?

Hi, I'm getting a pretty consistent timeout after 90 seconds. I followed this guide to fix the problem and changed my PHP settings to 600 for timeouts and 20M for file sizes. In my scenario, I am uploading images. A 100k image seems to upload without any problems but 500k image files time out after 90 seconds. Any ideas on what I can...