When preparing for and deploying the Infor CRM SLX web portals, one issue that can come up frequently is errors regarding processes or files being blocked or in-use. This causes failures during the web platform builds or during the deployment of the portals themselves. There are a couple of things you can check on to help preventing these errors during both phases of the building and deploying.
Windows Defender Settings
One frequent cause of file locks is a real-time scan of the files by Windows Defender blocking the replacement of that file. Windows Defender does allow for setting exclusions, both on folder or on processes. Adding exclusions should be done sparingly, and you should certainly avoid doing it on public facing folders. You can check your exclusions in Windows Powershell by typing these commands:
(Get-MpPreference).ExclusionPath
This shows any path exclusions that have been added.
(Get-MpPreference).ExclusionProcess
This shows any processes that have been excluded.
There are a few processes that you should consider excluding to prevent deployment issues:
w3wp.exe, The Application Architect, The new Deployment Utility (for web client initiated build and deploys), and finally the VBCSCompiler that is party of the Roslyn code compilation components within the web web portals.
It is important to exclude the fully qualified path to the process, and not just by name so that a hacker does not impersonate a file name and have Defender ignore that. So for the processes mentioned above (assuming you used standard install paths) the commands in Powershell would be:
Add-MpPreference -ExclusionProcess "C:\Windows\System32\inetsrv\w3wp.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Saleslogix\AppArchitect.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Saleslogix\DeploymentUtility.exe" Add-MpPreference -ExclusionProcess "C:\inetpub\wwwroot\SlxClient\roslyn\VBCSCompiler.exe"
One other place you should consider adding an exception is to add an exception for the entire build folder location, as defined in the Application Architect. This way when the web platform is being built Defender is not attempting to scan all of the temp files being place there. The Powershell path for that standard build location would looks something like this:
Add-MpPreference -ExclusionPath C:\Users\MyUser\AppData\Roaming\Sage\Platform\Output -ErrorAction SilentlyContinue
New SQL Optimizations
One of the recurring database queries that happens over and over during the deployment is a query that looks similar to this:
Select * from sysdba.VIRTUALFILESYSTEMVIEW where ITEMNAME like '%somethingsomething.xml' AND ITEMPATH like '\SOMEPATH\%' and ISDIRECTORY = 'F' order by ITEMNAME asc
While the VIRTUALFILESYSTEMVIEW does have its own standard indexes, the particular query being run in the build process can be better served by creating a more targeted index. The following SQL script will add an index and database stats. In my testing it reduced the load on the SQL server’s CPU utilization on my test system from running at ~75% during the build process to running at around 20% CPU utilization afterwards.
SET ANSI_PADDING ON go CREATE NONCLUSTERED INDEX [VFS_index_VIRTUALFILESYSTEMVIEW_builder] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW] ( [ITEMPATH] ASC, [VIRTUALFILESYSTEMID] ASC, [VFSDATAID] ASC, [ISDIRECTORY] ASC, [ITEMNAME] ASC ) INCLUDE([PARENTITEMID],[ITEMEXTENSION],[ITEMATTRIBUTES],[ISCOMPRESSED],[CREATEDATE],[CREATEUSER],[MODIFYDATE],[MODIFYUSER],[ISREADONLY],[ISSYSTEM],[ISHIDDEN],[ISOUTOFSYNC],[LASTSYNCDATE]) WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] go CREATE STATISTICS [VFS_stat_ITEMPATH] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([VFSDATAID], [ITEMPATH]) WITH AUTO_DROP = OFF go CREATE STATISTICS [VFS_stat_ISDIRECTORY] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([VIRTUALFILESYSTEMID], [VFSDATAID], [ISDIRECTORY]) WITH AUTO_DROP = OFF go CREATE STATISTICS [VFS_stat_1] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([ITEMNAME], [ISDIRECTORY], [ITEMPATH]) WITH AUTO_DROP = OFF go CREATE STATISTICS [VFS_stat_2] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([ITEMPATH], [ISDIRECTORY], [ITEMNAME], [VIRTUALFILESYSTEMID]) WITH AUTO_DROP = OFF go CREATE STATISTICS [VFS_stat_3] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([ITEMNAME], [ISDIRECTORY], [VIRTUALFILESYSTEMID], [VFSDATAID]) WITH AUTO_DROP = OFF go CREATE STATISTICS [VFS_stat_4] ON [SYSDBA].[VIRTUALFILESYSTEMVIEW]([VIRTUALFILESYSTEMID], [ITEMPATH], [VFSDATAID], [ISDIRECTORY], [ITEMNAME]) WITH AUTO_DROP = OFF go
SQL Index Fragmentation
Going hand-in-hand with the optimized index listed above, another thing that can improve performance in general is to ensure that your Saleslogix database has indexes that are not highly fragmented. This is especially true of the database tables used to store the web components. These tables have frequent write actions on them, with rows being added and removed all of the time. This can cause rapid fragmentation of the indexes. I would recommend making sure you monitor and often defragment the indexes on the 3 tables:
VFSDATA
VIRTUALFILESYSTEM
VIRTUALFILESYSTEMVIEW



