Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

aliazizi
Contributor II

Error: Failed to create QlikView Engine

Hi guys

We are running QV11.2 SR15 on Windows 2012 R2. We recently upgraded from QV11.2 SR11 to this SR15 version.

After upgrading we are experiencing some warning issues for some reloading tasks on the publisher server. It's not occuring constantly and not for all tasks, but most likely randomly in different times and for different tasks.

The publisher server has 2 x "Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz, 3396 Mhz, 6 Core(s), 12 Logical Processor(s)", and the "Max number of simultaneous QlikView engines for distribution" is set to 10. The server is a physical machine.

The error messages we get in the task log is as following:

Information Attempt:01

Error Failed to create QlikView Engine.. Exception=System.Runtime.InteropServices.COMException (0x80080005)...

Information Failed to create QlikView Engine - Cleanup and retry (3 second pause before trying again)

Information Attempt:11

.

.

Information Failed to create QlikView Engine - Cleanup and retry (3 second pause before trying again)

Warning Failed to allocate new QlikView Engine. Retrying! Current usage count=8 of 10 (of type non-reader).

Information Allocating new QlikView Engine. Current usage count=5 of 10 (of type non-reader).

Information Max retries:5

Information Attempt:01

Information Opened the QlikView Engine successfully. ProcessID=8160

And then the task runs successfully.

Do you know anything about this issue?

Thank you in advance

1 Solution

Accepted Solutions
Support
Support

Re: Error: Failed to create QlikView Engine

Hello Ali,

Typically this warning is returned when there are more Publisher tasks scheduled than there are available QlikView engines. You'll notice in the snippet of the task log you created, that after the warning there are available engines to complete the task.

The tell here is the error: "Error Failed to create QlikView Engine.. Exception=System.Runtime.InteropServices.COMException (0x80080005)..." this error indicates you're running into Windows default limitation of 10 COM objects, commonly known as the Desktop Memory Heap.


The memory heap is a Windows settings that effects the number of concurrent processes of the same kind. If you enable a high number of reload engines, and start seeing windows errors related to Windows running out of DeskTop Heap Size. This will be visible in the Windows System Event log, with errors saying "DeskTop Heap exhausted". If so, you will need to adjust Windows DeskTop Heap Size to allow for a higher server load.

IMPORTANT: Windows registry changes are made at your own risk and are not supported by Qlik Support. Please make a backup of the Windows registry before applying changes to enable rollback if the settings change fails or introduces Windows instability.

Desktop Memory Heap size is control in the following Windows registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

Change the desktop heap setting by setting the SharedSection value to 1024,20480,2048. After change the registry key should look something like the following (all on one line):

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows
SharedSection=1024,20480,2048 Windows=On SubSystemType=Windows
ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off
MaxRequestThreads=16

Notice that the default value is 1024,3072,512 in x86 or 1024,20480,768 in x64 environments.

Microsoft references on Windows heap size:
http://blogs.msdn.com/ntdebugging/archive/2007/07/05/desktop-heap-part-2.aspx
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

Microsoft reference regarding Windows heap and Server 2012:
https://support.microsoft.com/en-us/kb/947246

- Chip

Sr. Technical Support Engineer with Qlik Support
4 Replies
Support
Support

Re: Error: Failed to create QlikView Engine

Hello Ali,

Typically this warning is returned when there are more Publisher tasks scheduled than there are available QlikView engines. You'll notice in the snippet of the task log you created, that after the warning there are available engines to complete the task.

The tell here is the error: "Error Failed to create QlikView Engine.. Exception=System.Runtime.InteropServices.COMException (0x80080005)..." this error indicates you're running into Windows default limitation of 10 COM objects, commonly known as the Desktop Memory Heap.


The memory heap is a Windows settings that effects the number of concurrent processes of the same kind. If you enable a high number of reload engines, and start seeing windows errors related to Windows running out of DeskTop Heap Size. This will be visible in the Windows System Event log, with errors saying "DeskTop Heap exhausted". If so, you will need to adjust Windows DeskTop Heap Size to allow for a higher server load.

IMPORTANT: Windows registry changes are made at your own risk and are not supported by Qlik Support. Please make a backup of the Windows registry before applying changes to enable rollback if the settings change fails or introduces Windows instability.

Desktop Memory Heap size is control in the following Windows registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

Change the desktop heap setting by setting the SharedSection value to 1024,20480,2048. After change the registry key should look something like the following (all on one line):

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows
SharedSection=1024,20480,2048 Windows=On SubSystemType=Windows
ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off
MaxRequestThreads=16

Notice that the default value is 1024,3072,512 in x86 or 1024,20480,768 in x64 environments.

Microsoft references on Windows heap size:
http://blogs.msdn.com/ntdebugging/archive/2007/07/05/desktop-heap-part-2.aspx
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

Microsoft reference regarding Windows heap and Server 2012:
https://support.microsoft.com/en-us/kb/947246

- Chip

Sr. Technical Support Engineer with Qlik Support
aliazizi
Contributor II

Re: Error: Failed to create QlikView Engine

Thank you Chip for your response

vindhya_giri
Contributor II

Re: Error: Failed to create QlikView Engine

Hi Chip,

We are using Tidal Scheduler for scheduling our DLY and MTH QV cycles through EDX.

We recently upgraded from QV 11.2 to QV12.10 SR1.

After the upgrade , tested the tasks and cycles through tidal as well as QMC. Did not come across any issues.

Yesterday, In our DEV machine, when trying to run the tasks through Tidal, some of the tasks completed normally but for some of them I am getting the following in task log. Also, this is bringing down our server. We had to reboot the server.

QMC task log Error:

Error: Failed to create QlikView Engine.. Exception=System.Runjavascript:void(0)time.InteropServices.COMException (0x8007012B): Retrieving the COM class factory for component with CLSID {BE1F19B5-415E-11D1-934D-0040333C91CC} failed due to the following error: 8007012b Only part of a ReadProcessMemory or WriteProcessMemory request was completed. (Exception from HRESULT: 0x8007012B). ||    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) ||    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) ||    at System.Activator.CreateInstance(Type type, Boolean nonPublic) ||    at System.Activator.CreateInstance(Type type) ||    at QVBWrapper.Document.<CreateQVBProcess>b__123_0(Boolean mutexCreated) ||    at SolutionGlobal.GlobalMutex.Lock(Action`1 action, TimeSpan timeout) ||    at QVBWrapper.Document.CreateQVBProcess

Tidal Result log error:

The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.

Retry in 10s...

Failed to create a client to the specified Uri, retries=1.

The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.

Computer Management--> Event Viewer log

Warning: Failed to allocate new QlikView Engine. Retrying! Current usage count=2 of 4 (of type non-reader).

Please advise.

Thanks

Regards

Vindhya

bharatahujarbc
New Contributor

Re: Error: Failed to create QlikView Engine

This happened with me today. Restarting the QDS did not help. The running jobs were not stopping even though there was no qvb.exe running. I ended up restarting the QMS and that reset all the failed job status and everything was back to normal.

Fortunately, mine was a Non-Prod environment so did not mind restarting the services. 

My server can accommodate up to 40 simultaneous engines for distributions as well as I have 2 servers for QDS Cluster. Not sure why it still failed 40-50 jobs with the same error throwing the following error. Please let me know if anyone has deep dived this issue any further.

(2018-12-19 14:00:19) Error: Failed to create QlikView Engine.. Exception=System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. ||    at QlikView.Global.DoLogProcessSummary() ||    at QVBWrapper.Document.CreateQVBProcess(ILogBucket logBucket, Boolean createEmptyDoc)

(2018-12-19 14:00:19) Information: Failed to create QlikView Engine - Cleanup and retry (3 second pause before trying again)

(2018-12-19 14:00:22) Information: Attempt:51