The app:
I have a hosted shiny app on an Ubuntu 14 server that primarily asks users to scroll through a DT::renderDT()
output, make some edits that are then loaded back with DT::replaceData()
.There are a bunch of files saved in csv that are used to exchange data between users.
Problem:
Users complain of random disconnection which is not happening at any specific point in the app. The shiny app disconnects randomly at some point - sometimes initially with no data inputs yet done and sometimes after data inputs. I have checked all 6 posts on rstudio including this one and this one.
I have checked the logs coming in:/var/log/shiny-server
in each individual file that corresponds to an app session and cannot find any abnormal ending to the app.
I have also checked the global logs in the following 4 files.
-rw-r----- 1 syslog adm 2517 Feb 16 06:54 kern.log
-rw-r----- 1 syslog adm 174044 Feb 16 06:54 syslog
-rw-r----- 1 syslog adm 62983 Feb 16 06:50 mail.log
-rw-r----- 1 syslog adm 708664 Feb 16 06:50 auth.log
-rw-r--r-- 1 root root 3799705 Feb 16 06:45 shiny-server.log
But I am unable to see a clear correlation with a specific log and the crash.
I need some guidance on what could be going wrong and which log entry could be the reason of the disconnect so that we can delve deeper. I have posted the tail of the few logs to give any idea.
kern.log:
studio@ip-172-31-30-19:/var/log$ sudo tail kern.log
Feb 12 09:26:03 ip-172-31-30-19 kernel: [5604079.054563] TCP: request_sock_TCP: Possible SYN flooding on port 3067. Sending cookies. Check SNMP counters.
Feb 13 01:06:44 ip-172-31-30-19 kernel: [5660519.418844] audit: type=1400 audit(1550020004.138:22): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=29105 comm="apparmor_parser"
Feb 13 01:06:44 ip-172-31-30-19 kernel: [5660519.432293] audit: type=1400 audit(1550020004.154:23): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=29105 comm="apparmor_parser"
Feb 13 09:51:19 ip-172-31-30-19 kernel: [5691994.670187] TCP: request_sock_TCP: Possible SYN flooding on port 6447. Sending cookies. Check SNMP counters.
Feb 13 16:20:56 ip-172-31-30-19 kernel: [5715372.138169] TCP: request_sock_TCP: Possible SYN flooding on port 4657. Sending cookies. Check SNMP counters.
Feb 13 20:54:23 ip-172-31-30-19 kernel: [5731778.660324] TCP: request_sock_TCP: Possible SYN flooding on port 6721. Sending cookies. Check SNMP counters.
Feb 14 12:44:17 ip-172-31-30-19 kernel: [5788772.641030] TCP: request_sock_TCP: Possible SYN flooding on port 3579. Sending cookies. Check SNMP counters.
Feb 14 15:43:32 ip-172-31-30-19 kernel: [5799527.513622] TCP: request_sock_TCP: Possible SYN flooding on port 5068. Sending cookies. Check SNMP counters.
Feb 15 12:16:58 ip-172-31-30-19 kernel: [5873533.572321] TCP: request_sock_TCP: Possible SYN flooding on port 4677. Sending cookies. Check SNMP counters.
Feb 16 01:24:29 ip-172-31-30-19 kernel: [5920785.061662] TCP: request_sock_TCP: Possible SYN flooding on port 7561. Sending cookies. Check SNMP counters.
syslog:
rstudio@ip-172-31-30-19:/var/log$ sudo tail -25 syslog
Feb 16 01:19:23 ip-172-31-30-19 systemd[1]: Started Daily apt upgrade and clean activities.
Feb 16 01:20:01 ip-172-31-30-19 CRON[12726]: (rstudio) CMD (~/aws-scripts-mon/mon-put-instance-data.pl --mem-used-incl-cache-buff --mem-util --disk-space-util --disk-path=/--from-cron)
Feb 16 01:20:01 ip-172-31-30-19 postfix/pickup[12468]: 691441F6F9B: uid=1001 from=<rstudio>
Feb 16 01:20:01 ip-172-31-30-19 postfix/cleanup[12730]: 691441F6F9B: message-id=<20190216012001.691441F6F9B@ip-172-31-30-19.ap-south-1.compute.internal>
Feb 16 01:20:01 ip-172-31-30-19 postfix/qmgr[10563]: 691441F6F9B: from=<rstudio@gmail.com>, size=801, nrcpt=1 (queue active)
Feb 16 01:20:01 ip-172-31-30-19 postfix/local[12732]: 691441F6F9B: to=<rstudio@gmail.com>, orig_to=<rstudio>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 16 01:20:01 ip-172-31-30-19 postfix/qmgr[10563]: 691441F6F9B: removed
Feb 16 01:24:29 ip-172-31-30-19 kernel: [5920785.061662] TCP: request_sock_TCP: Possible SYN flooding on port 7561. Sending cookies. Check SNMP counters.
Feb 16 01:25:01 ip-172-31-30-19 CRON[12802]: (rstudio) CMD (~/aws-scripts-mon/mon-put-instance-data.pl --mem-used-incl-cache-buff --mem-util --disk-space-util --disk-path=/--from-cron)
Feb 16 01:25:01 ip-172-31-30-19 CRON[12803]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 16 01:25:01 ip-172-31-30-19 postfix/pickup[12468]: 6CF961F6F9B: uid=1001 from=<rstudio>
Feb 16 01:25:01 ip-172-31-30-19 postfix/cleanup[12808]: 6CF961F6F9B: message-id=<20190216012501.6CF961F6F9B@ip-172-31-30-19.ap-south-1.compute.internal>
Feb 16 01:25:01 ip-172-31-30-19 postfix/qmgr[10563]: 6CF961F6F9B: from=<rstudio@gmail.com>, size=801, nrcpt=1 (queue active)
Feb 16 01:25:01 ip-172-31-30-19 postfix/local[12810]: 6CF961F6F9B: to=<rstudio@gmail.com>, orig_to=<rstudio>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 16 01:25:01 ip-172-31-30-19 postfix/qmgr[10563]: 6CF961F6F9B: removed
Feb 16 01:26:43 ip-172-31-30-19 systemd[1]: Started Session c882 of user rstudio.
Feb 16 01:26:47 ip-172-31-30-19 dbus[1167]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Feb 16 01:26:47 ip-172-31-30-19 systemd[1]: Starting Time & Date Service...
Feb 16 01:26:47 ip-172-31-30-19 dbus[1167]: [system] Successfully activated service 'org.freedesktop.timedate1'
Feb 16 01:26:47 ip-172-31-30-19 systemd[1]: Started Time & Date Service.
Feb 16 01:27:20 ip-172-31-30-19 systemd[1]: Started Session c883 of user rstudio.
Feb 16 01:27:25 ip-172-31-30-19 dbus[1167]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Feb 16 01:27:25 ip-172-31-30-19 systemd[1]: Starting Time & Date Service...
Feb 16 01:27:25 ip-172-31-30-19 dbus[1167]: [system] Successfully activated service 'org.freedesktop.timedate1'
Feb 16 01:27:25 ip-172-31-30-19 systemd[1]: Started Time & Date Service.
shiny-server.log
rstudio@ip-172-31-30-19:/var/log$ sudo tail -25 shiny-server.log
[2019-02-16T01:27:33.831] [TRACE] shiny-server - Worker #797e51bd04c92a5f releasing http port. 0 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:02.443] [TRACE] shiny-server - Reusing existing instance
[2019-02-16T01:28:02.443] [TRACE] shiny-server - Worker #797e51bd04c92a5f acquiring http port. 1 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:02.443] [TRACE] shiny-server - Proxying request: /session/5478455156a413adcce091ac86b57ebe/dataobj/tbl?w=&nonce=b3de3c7ab8173803
[2019-02-16T01:28:02.443] [TRACE] shiny-server - http_proxy event: start
[2019-02-16T01:28:02.443] [TRACE] shiny-server - http_proxy event: proxyReq
[2019-02-16T01:28:02.575] [TRACE] shiny-server - http_proxy event: proxyRes
[2019-02-16T01:28:02.576] [TRACE] shiny-server - http_proxy event: end
[2019-02-16T01:28:02.576] [TRACE] shiny-server - Worker #797e51bd04c92a5f releasing http port. 0 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:04.830] [TRACE] shiny-server - Reusing existing instance
[2019-02-16T01:28:04.830] [TRACE] shiny-server - Worker #797e51bd04c92a5f acquiring http port. 1 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:04.830] [TRACE] shiny-server - Proxying request: /session/5478455156a413adcce091ac86b57ebe/dataobj/tbl?w=&nonce=b3de3c7ab8173803
[2019-02-16T01:28:04.830] [TRACE] shiny-server - http_proxy event: start
[2019-02-16T01:28:04.831] [TRACE] shiny-server - http_proxy event: proxyReq
[2019-02-16T01:28:04.879] [TRACE] shiny-server - http_proxy event: proxyRes
[2019-02-16T01:28:04.879] [TRACE] shiny-server - http_proxy event: end
[2019-02-16T01:28:04.880] [TRACE] shiny-server - Worker #797e51bd04c92a5f releasing http port. 0 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:08.783] [TRACE] shiny-server - Reusing existing instance
[2019-02-16T01:28:08.783] [TRACE] shiny-server - Worker #797e51bd04c92a5f acquiring http port. 1 HTTP, 1 WebSocket, 0 pending.
[2019-02-16T01:28:08.783] [TRACE] shiny-server - Proxying request: /session/5478455156a413adcce091ac86b57ebe/dataobj/tbl?w=&nonce=b3de3c7ab8173803
[2019-02-16T01:28:08.783] [TRACE] shiny-server - http_proxy event: start
[2019-02-16T01:28:08.783] [TRACE] shiny-server - http_proxy event: proxyReq
[2019-02-16T01:28:08.795] [TRACE] shiny-server - http_proxy event: proxyRes
[2019-02-16T01:28:08.795] [TRACE] shiny-server - http_proxy event: end
[2019-02-16T01:28:08.796] [TRACE] shiny-server - Worker #797e51bd04c92a5f releasing http port. 0 HTTP, 1 WebSocket, 0 pending.