Recently discovered, working with Autodesk support, what was causing Maya 2014/2015 to take an additional 30 seconds to shutdown when running on our closed network (no internet access) and wanted to share, in case anyone else is experiencing this issue.
The issue is that the Autodesk Customer Involvement Program (CIP) invokes a TCP connection to Amazon web services (AWS) during Maya shutdown that does not time out quickly if there is no internet access. This behavior needs to be disabled with an env var since disabling CIP in the Maya Help menu does not (I logged a support ticket with Autodesk about this and they are looking into it).
To disable CIP, add this line to your maya.env:
MAYA_DISABLE_CIP=1
Additionally the Customer Error Reporting (CER) can also be disabled.This does not exhibit the same behavior, but since we have a closed network data will never get out anyway.
MAYA_DISABLE_CER=1
This behavior can be observed in ProcMon (love this program!) in the form of:
I was concerned by this issue these last days, trying to jump from 2013 to 2016. Even when disabling the CIP and CER Maya still takes 5 to 15 seconds to close (while 2013 take less than 1). In the end I just rewrote a custom quit function that overwrite the native one (in a non-destructive manner of course).
This way you can use Maya normally and this function will take over the default one (therefore ALT+F4 or the native cross button call this function). The current taskkill call is dirty but that was just a quick try, there is maybe a better way to isolate the current maya executable in order to kill it.
I’m a fan of using taskkill, I’ve got one for murdering Unity, Maya, and Unreal. I just pin those to a shortcut bar, I started doing it when it was faster to kill the task than to let unreal finish crashing.
I would however recommend, adding the /T flag to it, that way any child processes it might have spawned die with it. Less chance of leaving zombie processes floating around.
I use a taskkill shortcut, but always forget to save my prefs first. Then I lament the next time I start maya and have to find the last file that I was working on because it’s not in the recent files part of the menu
[QUOTE=Froyok;29459]That’s true, however someone suggested me an alternative where you can kill only the instance you are in. Here is the updated code :
global proc quit()
{
//Query scene changes
saveChanges("");
//Save prefs
savePrefs;
saveToolSettings;
saveViewportSettings;
pluginInfo -savePluginPrefs;
//Kill maya
$i = `getpid`; //application ID
system("taskkill /PID " + $i +" /f");
}
[/QUOTE]
Seeing this is still a problem with 2017 (in fact, it seems to have gotten worse, seeing Maya now also runs 6 chrome browsers under the hood on top of the rest of the spyware infested core of Maya),
i’ve taken the liberty of changing the code so it handles like the standard behaviour (when the save confirmation pops up, the program should stop quitting when the user chooses the cancel option.)
global proc quit()
{
//Query scene changes, return without quitting when canceled.
if(!saveChanges("")) return;
//Save prefs
savePrefs;
saveToolSettings;
saveViewportSettings;
pluginInfo -savePluginPrefs;
//Kill maya
$i = `getpid`; //application ID
system("taskkill /PID " + $i +" /f");
}