timeout

PHP connection_aborted() not working correctly

点点圈 提交于 2019-12-12 10:08:55
问题 I have the following code: ignore_user_abort(true); while(!connection_aborted()) { // do stuff } and according to the PHP documentation, this should run until the connection is closed, but for some reason, it doesn't, instead it keeps running until the script times out. I've looked around online and some recommended adding echo chr(0); flush(); into the loop, but that doesn't seem to do anything either. Even worse, if I just leave it as while(true) { // do stuff } PHP still continues to run

PHP MySQL small query timeout, have to set limit to 10

廉价感情. 提交于 2019-12-12 09:47:29
问题 I am getting PHP timeout errors when calling mysql_query() for a relatively small query, so i have to set the limit to 10. Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\htdocs\data.php on line 19 I have removed the loop from the code, the code seems to hang at the mysql_query() function.. mysql_connect("192.168.50.250",$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT T.Tag as 'Device', y.alarmdesc as 'AlarmType'

Java - multiple requests from two WebContainer threads

时光怂恿深爱的人放手 提交于 2019-12-12 09:46:22
问题 We are testing a sub-system timeout of 150 seconds. So in my application, the first SOAP request is sent. Then 60 seconds later, another request is sent. My question is where is the other request coming from. It's new thread yet, but the client code has no re-try mechanism. This is running on WebSphere 6. These are snippets from the logs: 2011-01-18 16:16:32.696 EST [WebContainer : 0] DEBUG content <> << "<?xml version="1.0" encoding="UTF-8"?>[\n]" 2011-01-18 16:17:32.591 EST [WebContainer :

Azure SQL Database Operation Timeout

折月煮酒 提交于 2019-12-12 09:39:15
问题 I have a shared hosting site "production" that works perfectly. It has users and thus far I have no issues. I decided to created a test environment. I created another Azure app and copied the code from my "production" site to this test site. This happen today. It has no users. I created a DB and I agreed to pay five bucks a month. So this is not a free account. I uploaded my seed data which part of it was 40K rows of zip code. That went fine without issues. However, when I use the site, I

How to implement a Timeout on WebClient.DownloadFileAsync

杀马特。学长 韩版系。学妹 提交于 2019-12-12 09:00:07
问题 So I thought Webclient.DownloadFileAysnc would have a default timeout but looking around the documentation I cannot find anything about it anywhere so I'm guessing it doesn't. I am trying to download a file from the internet like so: using (WebClient wc = new WebClient()) { wc.DownloadProgressChanged += ((sender, args) => { IndividualProgress = args.ProgressPercentage; }); wc.DownloadFileCompleted += ((sender, args) => { if (args.Error == null) { if (!args.Cancelled) { File.Move(filePath,

Unable to acquire image through ImageIO.read(url) because of connection timed out

做~自己de王妃 提交于 2019-12-12 08:54:03
问题 The following code always seems to fail: URL url = new URL("http://userserve-ak.last.fm/serve/126/8636005.jpg"); Image img = ImageIO.read(url); System.out.println(img); I've checked the url, and it is a valid jpg image. The error I get is: Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL! at javax.imageio.ImageIO.read(ImageIO.java:1385) at maestro.Main2.main(Main2.java:25) Caused by: java.net.ConnectException: Connection timed out at java.net

How to terminate HttpWebRequest Connection in C#?It doesn't work even set timeout or readwritetimeout

一个人想着一个人 提交于 2019-12-12 08:33:11
问题 I want to terminate a httpwebrequest when it takes too long time in connection. Here is just a simaple code that I wrote: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Timeout = 5000; request.ReadWriteTimeout = 5000; request.Proxy = new WebProxy("http://" + proxyUsed + "/", true); request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)"; using (WebResponse myResponse = request.GetResponse()) { using (Stream s = myResponse.GetResponseStream()) { s

What to do when a py.test hangs silently?

筅森魡賤 提交于 2019-12-12 08:20:36
问题 While using py.test, I have some tests that run fine with SQLite but hang silently when I switch to Postgresql. How would I go about debugging something like that? Is there a "verbose" mode I can run my tests in, or set a breakpoint ? More generally, what is the standard plan of attack when pytest stalls silently? I've tried using the pytest-timeout, and ran the test with $ py.test --timeout=300, but the tests still hang with no activity on the screen whatsoever 回答1: I ran into the same

Timing out pure functions

China☆狼群 提交于 2019-12-12 08:19:03
问题 How can I "kill" a pure calculation which is taking too long? I tried import System.Timeout fact 0 = 1 fact n = n * (fact $ n - 1) main = do maybeNum <- timeout (10 ^ 7) $ (return . fact) 99999999 print maybeNum However, this doesn't work. Replace the (return . fact) 99999999 with a "real" IO function like getLine and this works as expected. 回答1: The point is that return (fact 999999999) immediately returns and doesn't trigger the timeout. It returns a thunk that will be evaluated later. If

Failed to install apk on device 'emulator-5554': timeout

徘徊边缘 提交于 2019-12-12 08:03:57
问题 I am new to Android development. I tried to run LunarLander project (create new project based on sample) in this folder C:\Program Files\Android\android-sdk-windows\samples\android-9\LunarLander But I got this error: Failed to install LunarLander.apk on device 'emulator-5554': timeout But if I copied it out to C:\LunarLander, it runs fine. I guess there is something wrong with the path. How do I fix or troubleshoot this? 回答1: Don't use spaces in your directory names. If you have files that