VitalPBX 3 Updating Template

When modifying the custom tab and then updating a temple that has hundreds of phones, VitalPBX throws this error. It looks to me like a PHP session to MySQL timeout.

{ "state": "success", "action": "dialog", "html": "
×<\/span>Close<\/span> <\/button>
An exception has occurred<\/h4> <\/div>
Exception<\/b>: Error while sending QUERY packet. PID=10394 at file \/usr\/share\/vitalpbx\/www\/includes\/db.php on line 0<\/p>
Error Trace<\/legend>\n\t\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
#<\/th>\n\t\t\t\t\t	File<\/th>\n\t\t\t\t\t	Function<\/th>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t<\/thead>\n\t\t\t\t\t
1<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/index.php:0<\/td>\n \t\t\t\t	app\\Core->run(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
2<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/app\/Core.php:0<\/td>\n \t\t\t\t	app\\Core->_loadModule(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
3<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/app\/Core.php:0<\/td>\n \t\t\t\t	app\\Core->loadModuleAction(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
4<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/app\/Core.php:0<\/td>\n \t\t\t\t	modules\\provisioning_templates\\provisioning_templates->put(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
5<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/modules\/provisioning_templates\/provisioning_templates.php:0<\/td>\n \t\t\t\t	modules\\provisioning_templates\\provisioning_templates->getContent(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
6<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/modules\/provisioning_templates\/provisioning_templates.php:0<\/td>\n \t\t\t\t	components\\modules\\Controller->render(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
7<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/components\/modules\/Controller.php:0<\/td>\n \t\t\t\t	components\\modules\\Controller->getDisplayName(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
8<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/components\/modules\/Controller.php:0<\/td>\n \t\t\t\t	vitalpbx\\module->find_by_name(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
9<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/module.php:0<\/td>\n \t\t\t\t	vitalpbx\\db->query_object(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
10<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/db.php:0<\/td>\n \t\t\t\t	vitalpbx\\db->__construct(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t
11<\/th>\n \t\t\t\t	\/usr\/share\/vitalpbx\/www\/includes\/db.php:0<\/td>\n \t\t\t\t	{closure}(...args);<\/td>\n\t\t\t\t\t<\/tr>\n\t\t\t\t\t\n\t\t\t\t\t<\/tbody>\n\t\t\t\t\t<\/table>\n\t\t\t\t\t<\/div>\n\t\t\t\t <\/div>
Close<\/button> <\/div> <\/form> <\/div> <\/div> <\/div>", "notification": null, "dialog": "modal-80", "callback": "" }
Fatal error: Uncaught Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away With Query: update `ombu_sessions` set `modified` = now() where `session_id` = unhex(?) in /usr/share/vitalpbx/www/includes/db.php:0 Stack trace: #0 /usr/share/vitalpbx/www/includes/db.php(0): vitalpbx\db->__construct('update `ombu_se...', Array, Object(Closure)) #1 /usr/share/vitalpbx/www/includes/session.php(0): vitalpbx\db::query('update `ombu_se...', '540f16e837f332d...') #2 [internal function]: vitalpbx\session->write('540f16e837f332d...', '') #3 [internal function]: session_write_close() #4 {main} thrown in /usr/share/vitalpbx/www/includes/db.php on line 0

Screenshot: