long-running-processes

Calling a long running process asynchronously on a button click in JSF

笑着哭i 提交于 2019-11-26 21:57:29
问题 I want to execute a stored proc by clicking on a button developed in JSF and Java. The proc takes roughly around 30 minutes in execution. When the user clicks on this button, s/he should get a default message like - Data is being processed. Kindly login after 60 minutes to check the data. Now when we click on the button, the UI Page hangs for the time when the proc is getting executed. Is there a workaround to show this default message and run the proc in the backend? 回答1: Just trigger an

Long-running ASP.NET tasks

99封情书 提交于 2019-11-26 21:07:19
I know there's a bunch of APIs out there that do this, but I also know that the hosting environment (being ASP.NET) puts restrictions on what you can reliably do in a separate thread. I could be completely wrong, so please correct me if I am, this is however what I think I know. A request typically timeouts after 120 seconds (this is configurable) but eventually the ASP.NET runtime will kill a request that's taking too long to complete. The hosting environment, typically IIS, employs process recycling and can at any point decide to recycle your app. When this happens all threads are aborted

MySQL - can I limit the maximum time allowed for a query to run?

对着背影说爱祢 提交于 2019-11-26 19:01:42
I'm looking for a way to limit the max running time of a query on mysql server. I figured this could be done through the my.cnf configuration file, but couldn't find anything relevant in the docs. Anyone knows if this could be done? thanks. There is no way to specify a maximum run time when sending a query to the server to run. However, it is not uncommon to have a cron job that runs every second on your database server, connecting and doing something like this: SHOW PROCESSLIST Find all connections with a query time larger than your maximum desired time Run KILL [process id] for each of those

Long running REST API with queues

时间秒杀一切 提交于 2019-11-26 18:46:31
问题 We are implementing a REST API, which will kick off multiple long running backend tasks. I have been reading the RESTful Web Services Cookbook and the recommendation is to return HTTP 202 / Accepted with a Content-Location header pointing to the task being processed. (e.g. http://www.example.org/orders/tasks/1234), and have the client poll this URI for an update on the long running task. The idea is to have the REST API immediately post a message to a queue, with a background worker role

Long-running ASP.NET tasks

非 Y 不嫁゛ 提交于 2019-11-26 07:49:46
问题 I know there\'s a bunch of APIs out there that do this, but I also know that the hosting environment (being ASP.NET) puts restrictions on what you can reliably do in a separate thread. I could be completely wrong, so please correct me if I am, this is however what I think I know. A request typically timeouts after 120 seconds (this is configurable) but eventually the ASP.NET runtime will kill a request that\'s taking too long to complete. The hosting environment, typically IIS, employs

MySQL - can I limit the maximum time allowed for a query to run?

烈酒焚心 提交于 2019-11-26 07:43:28
问题 I\'m looking for a way to limit the max running time of a query on mysql server. I figured this could be done through the my.cnf configuration file, but couldn\'t find anything relevant in the docs. Anyone knows if this could be done? thanks. 回答1: There is no way to specify a maximum run time when sending a query to the server to run. However, it is not uncommon to have a cron job that runs every second on your database server, connecting and doing something like this: SHOW PROCESSLIST Find