Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_sommer

Server-Task delaying

Hi,

some of my task-chains which runs daily triggered through the qv server (no publisher available) needs to be to delayed on sunday for 5 hours.

For this I have created some start-qvw's which check the weekday and delay it then - the weekday checking worked without a problem but the delaying from following-tasks is only 60 minutes (3 task-chaines) or 90 minutes (2 task-chaines).

Are there any timeout-settings or could it be that there are then too many parallel-tasks (how many are possible within the server - two?) because of this waiting some of the task-chains are now overlapping eachother?

How could it be handled? Especially if I don't want to use solely windows-task triggered macro-routines (which I have used previously).

This is the routine - but I think they isn't the issue:

if num(weekday(today())) = 6 then

    // hours * minutes * seconds * 1000 (for milliseconds)

     sleep 5 * 60 * 60 * 1000; // 5 hours delay on sundays (values in milliseconds)

else

    sleep 50;

end if

I hope someone could help me. Many thanks.

- Marcus

15 Replies
marcus_sommer
Author

The first two tasks worked (after implementing the hours-loop) fine with each 5 hours delaying to the normal start-time. But all then followings tasks failed with these error:

27.09.2015 06:30:01 Error Failed to allocate a QlikView Engine.
27.09.2015 06:30:01 Error No QlikView Engine was available after waiting for 45 minutes

For me it looked that only two task would work parallel and/or waiting tasks will be aborted after 45 minutes. Are there further settings to influence this? What are the max. Limits for parallel tasks, waiting times and so on?

Other ideas to delay tasks?

- Marcus

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Hi Marcus,

I temporarily switched over from the bbq to a portable qlikview server (someone else is doing the dishes ) to bring you some good news: yes, there is a setting to improve your situation, but it is hidden in a configuration file and the QMC won't be of any help.

Open C:\Program Files\QlikView\Distribution Service\QVDistributionService.exe.config. Notepad will do just fine, but you can use any text editor.

Scroll down until you encouter a setting called "QvbWaitTimeoutMinutes". Overthere you'll find your value of 45 minutes. Increase this value so that it takes the maximum delay into account: the 5-hour wait time+the actual reload delay+any margin that you think is suitable.

Save and restart the QDS.

Note that this is a global setting. From now on, all queued tasks will wait for a free QVB engine for a very long time before giving up.

Alternatives? As far as I can see you are fighting a limitation of the standard Publisher "built into" QlikView Server: every task has only one trigger with a single set of specifications and those turn out not to be very flexible at all. Possible solutions:

  • Buy a Publisher license (too obvious and probably not very helpful...) With a full Publisher, you can give a task any number of triggers with any type of settings. For example running a task at a fixed time 6 days every week, and at another time on sunday only.
  • Or set your reload tasks to be triggered by "an external event", and use Windows Task Scheduler in combination withQMSEDX Enhanced to trigger a single task at different times every other day. More complex but very flexible.

Best,

Peter

marcus_sommer
Author

Many thanks. I will have a closer look in the next week on these setting but I think I will give it a try.

Maybe with an future extension of our environment I could get a publisher but it's no topic for the next time. External trigger per EDX would mean I had to use only those trigger then within the server is only one trigger for an application available and I think the disadvantages are greater then the benefits (here in my case, not in general).

- Marcus

marcus_sommer
Author

The ninth task-chain failed after six hours (delaying was five hours) with the following error-message:

04.10.2015 13:25:10 Warning The QlikView Engine is Reloading, it will be killed (Please ignore logged warnings/errors about the kill).
04.10.2015 13:25:11 Error The task "Controls/CheckWeekDay_Log+Meta.qvw" failed. Exception: QDSMain.Exceptions.TaskFailedException: Task execution failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed ---> System.Threading.ThreadAbortException: Der Thread wurde abgebrochen. bei System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, ....


But I believe my problem is solved - I have done both increasing the qvbwaittimeoutminutes and the number of parallel qvb-tasks - and I think that with a little bit fine-tuning it will run without any error. And even if the last chain with my logging- and meta-data failed it's no drama - nobody needs them on a sunday.

Many thanks for your help.

- Marcus

Not applicable

Note that we have run into this problem as well, and have been advised by QlikView support that bumping the QvbWaitTimeoutMinutes parameter up much more than the default 45 minutes can risk having the load run and be unable to write out the QVW at the end because of a Windows lock that expires on the file--- apparently, when the task is triggered, QV sets a lock on the QVW so that it isn't touched until it can get to it-- and Windows can timeout the lock  after 45 minutes, causing the reload write-out of the qvw to fail.   So the idea of setting the value to 5-hours would seem to be erroneous.   We're looking into instead governing the task triggers to depend on when the engines are available.

marcus_sommer
Author

I think the general statement that with a longer timeout-setting the risks increase will be correct - but in my in case it runs now stable since month.

- Marcus