I wonder if you're actually auto-terminating your sessions with your perl script.
Add this to your script after you call load_session() but before your script falls out of scope -
Vim::unset_logout_on_disconnect().
Also, don't call Util::disconnect().
I prefer to use a $vim variable vs the global variable to avoid side effects as well.
$vim = Vim::load_session(...);
undef $Vim::vim_global = undef; # this clears the vim global
$vim->unset_logout_on_disconnect();
Watch your sessions in vCenter, see if they're being disconnected after you call your cgi script.