timeout

Change timeout for each WCF method or call

浪子不回头ぞ 提交于 2019-12-30 06:35:13
问题 I have a quite large "old" WCF Service with many different methods. The most of these methods are "normal" so they should answer in less than 10 seconds but there are several methods (8 or 9) that are long processes so they can take a long time to get a response. The receivetimeout and sendtimeout were set to 00:40:00 to ensure they had time enought to accomplish these processes. The problem is sometimes we have connection issues and the "normal" methods take a really long time to crash...

Selenium random timeout exceptions without any message

ε祈祈猫儿з 提交于 2019-12-30 06:13:11
问题 Here is what I'm trying to do and most of the time I succeed: Basically I'm signing in on a website and then wait for a class to be in the source, then process the source code. The exception I get: Traceback (most recent call last): File "foo.py", line 495, in <module> report(login, password) File "foo.py", line 430, in report data = bar(login, password) File "foo.py", line 113, in ui.WebDriverWait(browser, 10).until(lambda browser: browser.find_elements_by_class_name("the-class-i-want"))

Set a timeout on socket_read

你。 提交于 2019-12-30 05:47:19
问题 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. I'm creating a socket with socket_create() and listening on it for connections, then when connected I listen for the data and then do something with it. When the timeout hits, I want to run socket_shutdown() and then socket_close() . 回答1: this

PHP curl timeout error detection

眉间皱痕 提交于 2019-12-30 03:45:08
问题 I use curl to perform a HTTP request like this: $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); How can I check if an error occurred, and whether it was a timeout error? 回答1: Use curl_errno() Code 28 is timeout. 回答2: you can check error number and its' description like this: // Check if any error occurred if(curl_errno($ch)) { echo 'Curl

Is it possible to check timeout on jQuery.post()?

混江龙づ霸主 提交于 2019-12-30 03:17:07
问题 I have this code requesting some folder info from a mysql DB: function gotoDir(pmcat_id, pcat_id){ $('#slideshowContainer').html('<img class="loader" src="/javascript/ajax-loader.gif">'); $.post("/publish/includes/content.includes/functions.slideshow.php", { updateSlideshowDir: 1, pmcat_id: pmcat_id, pcat_id: pcat_id }, function(data){ $('#pageSlideshow').html(data.content); }, "json" ); } Sometimes the post request times out because of bad internet connection. Is it possible to set a timeout

Netty Channel closed detection

青春壹個敷衍的年華 提交于 2019-12-30 00:38:06
问题 I am building a server client application using netty and ios, I am facing a problem when the user just turns off WiFi on his/her ios device, the netty server does not know about it. The server needs to know to do cleanup for that user and set him/her offline, but now when the user tries to connect again, the server just tells him that he/she is already online. 回答1: If I understood your problem correctly: You want to listen for client channel closed events in server side and do some session

Selenium click() event seems not to be always triggered => results in timeout?

≡放荡痞女 提交于 2019-12-29 18:38:18
问题 Here's what I do: selenium.click("link=mylink"); selenium.waitForPageToLoad(60000); // do something, then navigate to a different page // (window focus is never changed in-between) selenium.click("link=mylink"); selenium.waitForPageToLoad(60000); The link "mylink" does exist, the first invocation of click() always works. But the second click() sometimes seems to work, sometimes not. It looks like the click() event is not triggered at all, because the page doesn't even start to load.

How to execute a large PHP Script?

喜欢而已 提交于 2019-12-29 17:40:12
问题 Well basically I may want to execute a script that may take as much as 1 hours as well. What I really want to do is Send SMS to my users using a third party API. So its basically like I supply my script with an array of phone numbers and fire the method to send SMS. However assuming it take 5 seconds to send 1 SMS and I want to send 1000 SMS which is roughly 1 - 2 hours. I can't use set_time_limit() because I am on shared host. One way to do this is store numbers in a session and execute each

“A timeout was reached while waiting for the service to connect” error after rebooting

☆樱花仙子☆ 提交于 2019-12-29 12:11:32
问题 I have a custom-written Windows service that I run on a number of Hyper-V VMs. The VMs get rebooted a couple times an hour as part of some automated tests being run. The service is set to automatic start and almost all of the time, it starts up fine. However, maybe 5% of the time, with no pattern that I can discern, the service fails to start. When it fails, I get an error in Event Viewer saying A timeout was reached (30000 milliseconds) while waiting for the My Service Name service to

timeout on subprocess readline in python

痴心易碎 提交于 2019-12-29 11:45:22
问题 I have a small issue that I'm not quite sure how to solve. Here is a minimal example: What I have scan_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while(some_criterium): line = scan_process.stdout.readline() some_criterium = do_something(line) What I would like scan_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while(some_criterium): line = scan_process.stdout.readline() if nothing_happens_after_10s: break else: