timeout

Two forms one submit - Submit, delay, submit

元气小坏坏 提交于 2019-12-25 08:57:03
问题 I am trying to submit two forms at once (one goes to db and the other goes to fpdf to make labels). I use jquery to copy the variables from the first form to hidden inputs on the second form. I have seen this question asked a couple times on here but none of the answers have helped. I use the 'fake' ajax method - ie: I set the form target to a hidden iframe on the same page. So I want to submit one form, then use a delay then submit the second form (because it's not working without the delay!

How can I optimize the view and avoid timeout error

我的未来我决定 提交于 2019-12-25 08:55:27
问题 I had a view map/reduce defined as following,as most of documents have no doc.emails[i].userTypecode elements in couchdb, so it is running the view takes too long causing couch to give up / time out: the error is Error: os_preocess_error, OS process time out, can some one help me how to figure out this issue and how to optimize the map/reduce? thank you I checked there are similar issue happened , but no idea how that were fixed?https://issues.apache.org/jira/browse/COUCHDB-1333 couchdb views

Automatically remove a record after a few minutes

穿精又带淫゛_ 提交于 2019-12-25 07:53:42
问题 I am going to use timeout as advised in my first question. So if a person views a post, he will be recorded into the list of people who are viewing the same post, and this record will be expired after a certain period of time (e.g. 5 minutes). Someone advised me to use cache to achieve this, but I think I will try to do it with Rails associations like follows. post has_many readers And in the PostsController#Show @post.readers.create(user: current_user) and I need to make this record to be

How can I workaround heroku's 30 sec timeout when executing long PLSQL procedure in Rails?

☆樱花仙子☆ 提交于 2019-12-25 07:40:09
问题 In a rails web app I needed to develop a page where I can launch PLSQL procedures. I finally developed it by this tutorial: How can I call a PLSQL function in rails, by clicking a button in a view? But I have a huge problem. The procedures I want to launch can run for several hours. The web app is in Heroku, which has a timeout set to 30 seconds. How can I rewrite my code in order to bypass this 30 sec timeout, and run the extremely long PLSQL procedures? 回答1: sounds like a thing for

Script output after timeout command

巧了我就是萌 提交于 2019-12-25 07:37:17
问题 i use symfony (php framework) task class to create cli scripts. Currently i wrote this kind of script: #!/bin/bash timeout 3600 ./symfony pparse:prices But there is no output, I need that script will exit after 3600 sec. and ./symfony pparse:prices output data to console. Timeout is working, but no output. 回答1: I dont know why, but currently it work fine. Maybe this is issue to OS. 来源: https://stackoverflow.com/questions/16582048/script-output-after-timeout-command

Perl telnet does not wait for the end of the previous command

旧街凉风 提交于 2019-12-25 05:29:06
问题 Perl telnet does not wait for the end of the previous command. In the file infile.log I see the continuation of the command my @ config = $ telnet-> cmd ("sh run"); , but the script is already beginning to run the command print ("Format configuration", $ _, "\ n"); . As a result, I get an empty array @config. foreach (@linksys_sps){ print ("Connecting to ",$_,"\n"); my $telnet = new Net::Telnet ( Timeout=>10,Errmode=>'return',Input_Log => "infile.log"); $telnet->open($_); if ($telnet->errmsg)

stream_socket_enable_crypto(); Disables stream_set_timeout

十年热恋 提交于 2019-12-25 05:27:17
问题 I have created an xmpp server, first using non tls which works as I want with no errors. The hole authentication works and I can chat with no problems. Before I start reading from the socket I did: stream_set_timeout($sock, 0, 1000); This will let me do things within the time when there is no new data from the server. Now I implemented starttls. I did stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_SERVER); which negotates the tls for me. This didn't worked because the read

Stored procedure timing out on particular connection pool

天大地大妈咪最大 提交于 2019-12-25 05:12:21
问题 I have a stored procedure which occasionally times out when called from our website (through the website connection pool). Once it has timed out, it has always been locked into the time-out, until the procedure is recompiled using drop/create or sp_recompile from a Management Studio session. While it is timing out, there is no time-out using the same parameters for the same procedure using Management Studio. Doing an "ALTER PROCEDURE" through Management Studio and (fairly drastically)

How can I schedule Java tasks at guaranteed fixed rate, independent of task run time?

我们两清 提交于 2019-12-25 05:10:11
问题 java.util.Timer's scheduleAtFixedRate is an obvious alternative if one wants to schedule tasks at a certain interval. However, if your interval is 10 s. and the tasks take more than 10 s. this function will busy-execute anything pending according to the documentation (quote: two or more executions will occur in rapid succession to "catch up."). This is of course a reasonable way to implement it, but it's not necessarily what you want. Does anyone know about standard functionality in the Java

Timeout for LWP request

戏子无情 提交于 2019-12-25 04:33:05
问题 I'm creating a user agent using LWP::UserAgent. I want to timeout $ua->request() . how can I do that? my $ua = LWP::UserAgent->new(); my $request = HTTP::Request->new(DELETE => $url); $req->authorization_basic($user, $pwd); my $response = $ua->request($req); I know LWP has time out, but according to the documentation The requests is aborted if no activity on the connection to the server is observed for timeout seconds. This means that the time it takes for the complete transaction and the