Shiny connexion postgresql down


I develop a shiny application which works well. This application make some Postgresql request.
Sometimes and i don't know why, it seems that the postgresql connexion stop working. It seems when the application is not use diring some days. I need to restart the shiny server and everythink become ok again.
I thought that it was a problem of closing session but I close all the connexion just after all the postgresql request.

If somebody have an idea, it will be wonderfull.



I think we need more information to help you out, can you share your app's logs and code?

Sorry for not answer you before :frowning:
The script is quiet long but I could give you an exemple.
In fact, it 's the postgresql connexion which sometime become unusable.
when I made a shiny server restart, all is ok during several days.
There is no error in the log but I found a lot of shiny process. Is it normal?
I saw that we could increase the log of shiny if I put this line in a file SHINY_LOG_LEVEL=TRACE

Thanks for all

Those are the server logs, I meant the app logs. Sadly, you are not providing any relevant information, the most I can do is speculate about this

Inactive Shiny apps stop itself after some time, and depending on how your postgresql server is configured, the odbc connecting is closed as well, so, trying to keep the connection active for days doesn't sound like a good idea.

Thanks for your answer.
There is nothing in the app trace.
Its seems that I have some process which never stop and could create problems.
when I stop this process, the application works again

root 4073682 3444913 0 09:02 ? 00:00:00 su -s /bin/bash --login -p -- shiny -c cd /srv/shiny-server/OSCAR && R --no-save --slave -f /opt/shiny-server/R/SockJSAdapter.R

Other question: I ran the shiny server by root user, is it the good thing to do?

Thanks for all


This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.