Is data_reminders_counter.php supposed to be posting dozens of times every minute?


(Ralf Lukner MD PhD) #1

Situation
Huge number of access.log items noted (maybe I need to turn this log off somehow because it grows too quickly to multiple GB in size?). @rmagauran

xx.xx.23.233 - - [01/Jul/2019:02:52:41 +0000] “POST /library/ajax/dated_reminders_counter.php HTTP/1.1” 200 54 “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:52:52 +0000] “GET /interface/main/tabs/timeout_iframe.php HTTP/1.1” 200 195 “http://xx.xxx.216.128/interface/main/tabs/timeout_iframe.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:52:52 +0000] “GET /interface/main/tabs/timeout_iframe.php HTTP/1.1” 200 195 “http://xx.xxx.216.128/interface/main/tabs/timeout_iframe.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xx.23.233 - - [01/Jul/2019:02:52:52 +0000] “POST /interface/patient_tracker/patient_tracker.php HTTP/1.1” 200 99370 “http://xx.xxx.216.128/interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xx.23.233 - - [01/Jul/2019:02:52:52 +0000] “POST /interface/patient_tracker/patient_tracker.php HTTP/1.1” 200 99370 “http://xx.xxx.216.128/interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/dated_reminders_counter.php HTTP/1.1” 200 54 “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/dated_reminders_counter.php HTTP/1.1” 200 54 “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/dated_reminders_counter.php HTTP/1.1” 200 3 “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/dated_reminders_counter.php HTTP/1.1” 200 3 “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/execute_background_services.php HTTP/1.1” 200 - “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
xx.xxx.174.137 - - [01/Jul/2019:02:53:05 +0000] “POST /library/ajax/execute_background_services.php HTTP/1.1” 200 - “http://xx.xxx.216.128/interface/main/tabs/main.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”

OpenEMR Version
I’m using OpenEMR version 5.0.1(7) AWS EXPRESS

Browser:
I’m using: N/A

Operating System
I’m using: Amazon AWS

Logs
Yes. See above.


(Stephen Waite) #2

hi @Ralf_Lukner, try adding logrotate to your openemr docker, https://www.cyberciti.biz/faq/how-to-install-and-configure-log-roate-in-alpine-linux/ , so you won’t have to worry about the access.log file size growth


(Ralf Lukner MD PhD) #3

So is docker using Alpine Linux?


(Ralf Lukner MD PhD) #4

Also, when I try to install lograte, I get the following error:

/var/www/localhost/htdocs/openemr # apk add lograte
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
lograte (missing):
required by: world[lograte]
/var/www/localhost/htdocs/openemr #


(Stephen Waite) #5

are you using openemr aws package standard? although see express above

guess it’s ubuntu then, so from the root bash prompt it would be apt install logrotate


(Ralf Lukner MD PhD) #6

Linux 4024c1cd642a 4.4.0-1087-aws #98-Ubuntu SMP Wed Jun 26 05:50:53 UTC 2019 x86_64 Linux

/var/log/apache2 # apt install logrotate
sh: apt: not found

Maybe I should follow this link: https://success.docker.com/article/how-to-setup-log-rotation-post-installation

How to setup log rotation post installation

Article ID: KB000369

EECED4MD4W

LINUXMACWINDOWSWINDOWS SERVERZ SYSTEMS

DAEMONINSTALLINGLOGGING

EE-17.06.2-EE-5UCP-2.2.3DTR-2.3.4

Recommended Articles

Issue

The default installation instructions do not include the setup of log rotation. This can cause the server to run out of space as the logs will consume all the available space.

Resolution

This process affect only the new containers NOT the old ones.

  1. Edit the daemon configuration file:
$ vim /etc/docker/daemon.json
  1. Add the following lines to file:
{
"log-driver": "json-file",
"log-opts": {
    "max-size": "10m",    
    "max-file": "3"    
    }
} 
  1. Restart the docker daemon: systemctl restart docker
  2. This step is required for ucp-kubelet container log rotation to be enabled: docker rm -f ucp-agent and let it reconcile docker rm -f ucp-kubelet and let it reconcile

… What do you think?


(Stephen Waite) #7

oh wait, see a typo,

should be apk add logrotate


(Ralf Lukner MD PhD) #8

/var/log/apache2 # apk add logrotate
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
logrotate (missing):
required by: world[logrotate]


(Stephen Waite) #9

try
apk add --no-cache logrotate


(Ralf Lukner MD PhD) #10

That worked:
/var/www/localhost/htdocs/openemr # apk add --no-cache logrotate

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz

(1/2) Installing popt (1.16-r7)

(2/2) Installing logrotate (3.13.0-r0)

Executing busybox-1.27.2-r7.trigger

OK: 186 MiB in 105 packages


(MD Support) #11

You can fix the root cause which is hard-coded frequency in that script. If your practice is ok with hourly check on reminders, change 60(seconds) to 3600.

$updateDelay = 60;

This should really be a user-specific setting with an option to turn off the check.


(Ralf Lukner MD PhD) #12

I’m sorry … I do not know the system well enough to know which script this refers to … and what kind of reminders are these exactly? I was just reporting what seems like very high activity without knowing much of what the purpose of the activity is.

I’m going to guess that the script is /library/ajax/dated_reminders_counter.php and that I could safely edit the $updateDelay variable to some number between 1 and 60.

–Ralf


(MD Support) #13

These are patient related reminders you or your staff will set for themselves or others. Script /interface/main/dated_reminders/dated_reminders.php keeps checking every minute if any reminders have become due in last 60 seconds. Most practices do not use reminders for actions that need to be acted upon in seconds but because of that hard-coded setting everyone ends up running this useless chatter in background without any way to modify from user screens.


(MD Support) #14

Forgot to mention - every connected session is doing this every 60 seconds. So if you have 5 users with 2 connected devices each, you will see at least 10 log entries on the server!


(Ralf Lukner MD PhD) #15

I changed to the following: $updateDelay = 3600;