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

Note whether a filepath (to save to) is available or not

Hi,

one of our primary data_loading apps which is set to reload every two hrs, triggering a cascade of other apps, fails regularly, usually sometime in the middle of the night, and then all of a sudden it works again.

I always have a look at the logs which are saved to a filepath on the QlikViewServer - and usually, the error description is "General Script error" at the point when some table is supposed to be stored as a qvd for later use.

There is no possibility of anything being wrong in the script, we have that app for quite a while now and it always ran without any trouble - and it does so now, most of the time anyway.

My assumption is that at that very moment, that filepath is not available for some reason. Strangely, just half a minute before, there is another STORE in the log which does work fine.

Is there anything I can do about that? Could I somehow test whether that path is available and only execute the STORE when it is?

Thanks a lot!

Best regards,

DataNibbler

7 Replies
marcus_sommer

Hi DataNibbler,

in unstable connection to the storage could be the reason but I think it's more likely that those qvd is locked through any process. This could be a anti-virus program, any other control process (maybe group policy stuff) or a windows-routine like the windows shadow copies (which was the reason by me in a similar case some years ago).

I have found it by comparing qv logs and windows event-logs.

- Marcus

petter
Partner - Champion III
Partner - Champion III

Actually the "right" way of solving this would be to turn off error checking that terminates the script at these critical points in the load script. Then you will also have to supplement with additional checks to be able to catch the errors that might occur.

This can be done by using the ErrorMode variable and setting it to 0. Most - but unfortunately not all - errors can then be caught by checking the dual-valued ScriptError variable immediately after the statement that might fail. In your case that would be something like:

STORE [a_table] INTO "SomeQVDfile.QVD" (QVD);

Unfortunately the last few or maybe many of the latest QV 11.20 Service Releases including SR12, does not handle this as it was originally documented/designed. It goes into a "General Script Error" instead of continuing the script and letting the script check the ScriptError.

This could SHOULD have worked in QV 11.2 SR12:

Set ErrorMode=0;

STORE [mytable] INTO "path_that_doesnt_work\myTable.QVD" (QVD);

vStoreError = ScriptError;

IF vStoreError > 0 THEN

     // some sensible error handling - reporting the acutal issue...

     // this code will never be reached since STORE when it gets into some kind of trouble with what

     // is after INTO just exists the script with a (almost) meaningless error: General Script Error

ENDIF;

The good news is that Qlik Sense behaves as it should. The better news is that QlikView 12 beta also works

as designed and will respect the ErrorMode 0 instead of failing with a general error. So hopefully this "fix" will also be a part of the IR (Intial Release) of QlikView 12 which is due pretty soon it seems.

Anyhow there is the option to do defensive coding by checking for the existence of a particular file by checking the filesize - which you do have a function in QlikView for.

petter
Partner - Champion III
Partner - Champion III

2015-10-06 #3.PNG

avinashelite

Hi DataNibbler,

Do you have any con current task running? i.e for storing the QVD s

*Check the total time required for the dashboard to get reload ,for e.g . say you have  a task1 refresh for every qvd for 1hr and based on the success another task2 gets activated  . if the reload task 2 takes more than a 1hr, then before the end of task2 the STORE cmd of task1 will start executing .

Scenario 1:  Read/Read - Task 1 (Read) opens the QVD file then Task 2 (Read) opens the file while Task 1 still has it open.  All tasks run fine.

Scenario 2:  Write/Read - Task 1 (Write) opens the QVD file then Task 2 (Read) also opens the file while Task 1 still has it open.  Task 2 will fail since Task 1 has the file opened exclusively and Task 1 will run fine.

Scenario 3:  Read/Write - Task 1 (Read) opens the QVD file then Task 2 (Write) also opens the file while Task 1 still has it open.  Task 2 will fail since it will not be allowed to open the file exclusively while there are other tasks reading from it.  Task 1 completes fine, Task 2 results in a failure.

datanibbler
Champion
Champion
Author

Hi all,

thanks for the answers!

Unfortunately, I don't myself have access to the Windows_event_logs. I don't have access to anything running on the server except what the IT_guys give me - I only got access to the QlikView_logs after a rather longish discussion 😉

Anyhow, I'll try to find out what i can.

I will also try to have QlikView updated to 12 asap.

I'll close this thread as I don't have time to further follow this right now.

Thanks to all once more!

Best regards,

DataNibbler

marcus_sommer

There is also a qv-connector for the windows-logs available: QvEventLogConnectorElaborate.exe from QVX SDK Instructions‌ which you could try or which your IT guys could check and make them accessible.

- Marcus

datanibbler
Champion
Champion
Author

Hi Marcus,

yep, that would be a good idea. i think I heard it before - the "make available" part is the difficulty (IT will not make anything on the server available to anyone outside the "IT world"; Their role here is - something - but not necessarily making our work easier 😉

Best regards,

DataNibbler