[Maya] Reducing Maya shutdown time by disabling Autodesk CIP

maya
#1

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:

10:48:47.3768889 AM  maya.exe      2944   Thread Create        SUCCESS       Thread ID: 3280
10:48:50.3769098 AM  maya.exe      2944   TCP Reconnect <machineNameOmitted> -> ec2-50-18-62-118.us-west-1.compute.amazonaws.com:http SUCCESS       Length: 0, seqnum: 0, connid: 0
10:48:56.3771721 AM  maya.exe      2944   TCP Reconnect <machineNameOmitted> -> ec2-50-18-62-118.us-west-1.compute.amazonaws.com:http SUCCESS       Length: 0, seqnum: 0, connid: 0
10:49:04.2095958 AM  maya.exe      2944   Thread Create        SUCCESS       Thread ID: 2260
10:49:11.3828316 AM  maya.exe      2944   TCP Reconnect <machineNameOmitted> -> ec2-184-169-129-189.us-west-1.compute.amazonaws.com:http SUCCESS       Length: 0, seqnum: 0, connid: 0
10:49:17.3642937 AM  maya.exe      2944   CreateFile       <filenameOmitted>  SUCCESS       Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened

3 Likes
#2

Thanks for this! The slow shunt down has been driving me nuts for weeks…

#3

Nice find, have to say that hang on shut-down has really started to piss me off! :slight_smile:

#4

Good one planetboy this is helpful ! Thanks a lot

#5

any other tips? i have both of these set and it still takes a good while to shutdown

#6

Thank you so much.

#7

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).

For those interested :

maya_exit.mel

global proc quit()
{
	//Query scene changes
	saveChanges("");
	
	//Save prefs
	savePrefs;
	saveToolSettings;
	saveViewportSettings;
	pluginInfo -savePluginPrefs;

	
	//Kill maya
	system("taskkill /IM maya.exe /f");
}

userSetup.mel

eval("source maya_exit.mel");

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.

#8

My cheat is to run maya from a command shell and control-c the shell when I need a fast quit :slight_smile:

#9

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.

#10

yes, taskkill /f /t /im maya.exe

let it die in a (quick) fire

#11

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

#12

How does this work if you have multiple instances of Maya open?

#13

they all die in a fire. this is by no means an elegant solution :slight_smile:

#14

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");
}
#15

[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");
}

#16

this script doesn’t save the current workspace in maya 2017. will need to dive in and find out how workspaces get saved during shutdown.