Kill ROracle query from Shiny

25 views
Skip to first unread message

Karim Chikh

unread,
May 31, 2017, 6:02:45 AM5/31/17
to Shiny - Web Framework for R
Hi everyone,

I built a Shiny app where the users can fetch data from and Oracle DB (using ROracle package).

However we want to give the users the possibility to kill the Oracle query that is taking too long and was wondering if anyone knows a trick to kill the query from Shiny?

So far, what the end users do is simply log out from shiny, and this does not sounds like a good solution as I don't even know if it really kills the query...
On top of that, it seems like the app sometimes crashes when the query is too big (anyone trying to access it gets an "Page not found" error) but not sure if that is the only cause as the app is new and need further testing.

Many Thanks,
Karim

Joe Cheng

unread,
Jun 1, 2017, 4:06:06 AM6/1/17
to Karim Chikh, Shiny - Web Framework for R
(I'm very surprised that you would get "Page not found" sometimes but not others on the same URL. If this behavior persists let me know.)

Are you using Shiny Server Open Source or Pro?
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/6e8a1fe1-a0f2-42d2-8f32-60a9e9c00af6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karim Chikh

unread,
Jun 1, 2017, 4:45:42 AM6/1/17
to Shiny - Web Framework for R, karim....@gmail.com
Hi, Yes I am using the Pro version and yes so far it seems like the user who runs the big query still sees the app's page but anyone else trying to do anything on it gets "Page not Found" but I will run further test to confirm.

Karim Chikh

unread,
Jun 22, 2017, 7:57:41 AM6/22/17
to Shiny - Web Framework for R, karim....@gmail.com
Hi,

Since my previous message we did check again the "Page not found" error and it still happens when someone runs a "too big" query: so while the query runs, the user just doesn't realise it but he's query is preventing anyone else from accessing the app.

So we thought about adding a kill query button but the solutions we found online such as the stackoverflow one below did not always work.

So by the end we still used the parallel processing and added a time limit to kill it (if the query runs for more than X minutes then kill).

I hope this helps those who get into same challenge.

/Kx

Joe Cheng

unread,
Jun 22, 2017, 4:53:17 PM6/22/17
to Karim Chikh, Shiny - Web Framework for R
For the life of me, I can't imagine why you would get "Page not found" (instead of some other kind of error). If you're still in a position to easily repro that, can you send me a screenshot? Seeing the fonts, etc. will help identify where the error is coming from (the browser, Shiny, or Shiny Server).

Reply all
Reply to author
Forward
0 new messages