Since the most recent update (4.0.11-1+bionic), when shutting down the server the server will wait during shutdown with "A stop job is running for zabbix-server... " for 30 minutes until it eventually times out.
In the logs (below) are continual attempts to contact MySQL, however this process has already shutdown earlier in the shutdown process prior to zabbix-server attempting to shutdown.
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Kernel: Linux 4.15.0-55-generic #60-Ubuntu
Zabbix packages installed:-
ii zabbix-agent 1:4.0.11-1+bionic amd64 Zabbix network monitoring solution - agent
ii zabbix-frontend-php 1:4.0.11-1+bionic all Zabbix network monitoring solution - PHP front-end
ii zabbix-release 1:4.0-3+bionic all Zabbix official repository configuration
ii zabbix-server-mysql 1:4.0.11-1+bionic amd64 Zabbix network monitoring solution - server (MySQL)
Logs:-
776:20190810:210239.281 Got signal [signal:15(SIGTERM),sender_pid:1417,sender_uid:0,reason:0]. Exiting ...
1173:20190810:210239.281 syncing history data in progress...
1173:20190810:210239.281 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1173:20190810:210239.281 database is down: reconnecting in 10 seconds
1181:20190810:210239.303 [Z3005] query failed: [1053] Server shutdown in progress [select taskid,type,clock,ttl from task where status in (1,2) order by taskid]
1181:20190810:210239.303 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1181:20190810:210239.303 database is down: reconnecting in 10 seconds
1173:20190810:210249.281 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1173:20190810:210249.282 database is down: reconnecting in 10 seconds
1181:20190810:210249.303 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1181:20190810:210249.303 database is down: reconnecting in 10 seconds
1173:20190810:210259.282 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1173:20190810:210259.282 database is down: reconnecting in 10 seconds
1181:20190810:210259.303 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1181:20190810:210259.303 database is down: reconnecting in 10 seconds
1173:20190810:210309.282 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1173:20190810:210309.282 database is down: reconnecting in 10 seconds
1181:20190810:210309.304 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1181:20190810:210309.304 database is down: reconnecting in 10 seconds
1173:20190810:210319.282 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1173:20190810:210319.283 database is down: reconnecting in 10 seconds
1181:20190810:210319.304 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1181:20190810:210319.304 database is down: reconnecting in 10 seconds
1167:20190810:210324.291 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1167:20190810:210324.291 database is down: reconnecting in 10 seconds
Just realised that this is not the package from Ubuntu - but an upstream package from Zabbix repository.
Sorry for the convenience - I could not find a way to delete my bug report.