User Limitation: Customize Error Page

Hi there!

We successfully use Shinyproxy 2.6.0 together with Keycloak for our apps and it works like charm. To improve our performance, we use Shinyproxys user limitation option. There are also no problems here, only a tiny “but”: We allow for N users and the moment user N+1 wants to access the app, he or she will see this rather user-unfriendly “Error 500: Container did not respond in time” error page.

So far I haven’t been able to find a way to customize this page. It would be great to have it like: “Dear user, currently there are N users visiting the website, please try again later” … or something like that. Do you maybe have a quick idea how I could solve this?

In any case, thank you for your work with Shinyproxy. It’s awesome!
Greetings from Germany

Hello, sorry for being off topic. But how did you implement the keycloak authentication? Did you setup a separate server in order to do this?

1 Like

Hi, no problem.

I think the combination of Keycloak and shinyproxy is rare enough on the one hand to have little installation experience and on the other hand little experience with customization. So we both have the same problem :slight_smile:

In our setting the error message appears from shinyproxy because it does not get a free “port from Docker” to start the app (i.e. it cannot start any more Docker containers). I was hoping that someone here in the forum had already come across this problem or at least had an idea for us out of consideration. But if not, that’s ok too.

To answer your question: Keycloak runs on the same server (i.e. the JBoss). It was a little hairy to install, but the result makes up for it.

Hi @yaxame,

In my case i tried different senarios : same server, different server, and all work very good.

A little recommandation is to put keycloak in a different small server: such as different service, so you should implement usecase separation logic.

server 0 : service for auth (sso)
server 1 : shinyproxy (replicas 1)

hope this help

hi @e-Lisa,

in your last message, it seems that you are dealing with two different problem/topic :

  • problem 1 : error occurs when the port is already in use, special when you stop or crash shinyproxy and containers keep running, the next time you run shinyproxy the first container app, will be launched with the first port in the range (default 2000), SOLUTION : use internal networking in docker, so shinyproxy will use internal network to communitcate with containers, no port will be used.

  • problem 2 : error page customization, SOLUTION : to do so, i put a nginx server behind shinyproxy and let nginx redirects to the appropirate error page when error occurs (404, 403, 500), this is very simple to implement, LIMITATION : some errors are not cached by nginx because the response code is 200 even if there is an error.

Let me know if this helps.