Schedule Analytics tables updating causing deadlock?

Awesome, found time to run this update on a test server. I’ll follow up in a month or 2 if this fixed our issue.

Version	2.38.3.1
Build revision	0339321
Build date	April 14, 2023 at 14:13
Jasper reports version	6.18.1
User agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
Server date	May 23, 2023 at 23:08
Last analytics table generation	May 23, 2023 at 21:00
Time since last analytics table generation	2 h, 8 m, 59 s
Last analytics table runtime	00:00:17.032
Environment variable	DHIS2_HOME
System ID	25e4b148-d2c4-4ae2-87f7-5e918bfa4b34
Last monitoring success	Never
External configuration directory	/home/dhis/config
File store provider	filesystem
Java opts	-Xmx2056m -Xms2056m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Java version	11.0.19
Java vendor	Ubuntu
OS name	Linux
OS architecture	amd64
OS version	5.4.0-1101-aws
Memory info	Mem Total in JVM: 2056 Free in JVM: 1842 Max Limit: 2056
CPU cores	2
Calendar	iso8601

Wanted to share a kudos to this post by moses because I couldn’t easily find a good backup command until I stumbled upon his post.

Just because I partially use this forum for my own personal reference (and in hopes that my notes can help others) here’s the commands I used to perform the upgrade. Looks good so far, and will likely run the upgrade on the production server next month just to stay away from the reporting deadline.

Made sure the latest was still the latest:
https://releases.dhis2.org/

2023-04-14 14:43:58
https://releases.dhis2.org/2.38/dhis2-stable-2.38.3.1.war

cd /home/dhis/
sudo -u dhis tomcat-dhis/bin/shutdown.sh

cd ~
sudo -u postgres pg_dump -T analytics_* -T aggregated* -T completeness* -O -x dhis2 | gzip > 2023-05-27_dhis2_database_backup.sql.gz

cd /home/dhis/
sudo wget https://releases.dhis2.org/2.38/dhis2-stable-2.38.3.1.war

sudo mv dhis2-stable-2.38.3.1.war /home/dhis/tomcat-dhis/webapps/ROOT.war

sudo -u dhis /home/dhis/tomcat-dhis/bin/startup.sh
1 Like