Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reload freezes after partial reload

Hello,

I programmed an application with macros to do a normal reload only when neccessary since a reload will take 10 to 30mins and is only needed once a week but it may happen at uncertain times like monday morning or tuesday noon. The solution works nicely in my desktop environment but on the server it simply does not run smoothly.

There is a synchronisation table in a MySQL database where freshly released weeks are to be inserted with a state like 'new'. The application has to read it and find out if there are weeks with the 'new' state and then do a reload via the api call doReload.

For the synchronisation table I use partial reload:

    ODBC CONNECT64 TO DB1 (XUserId is xxx, XPassword is xxx);

    weeks:

    replace LOAD

        week,

        state;

    SQL SELECT week,

        state

    FROM DB1.synctable;

    if IsPartialReload() = -1 Then

        EXIT Script;

    ENDIF

This check is supposed to be pretty quick. The application needs to be run via Windows Taskplaner since the QV scheduler does not have all the requirements for that: starting an application with certain parameters (variables) and running macros is a rather mystic issue as some calls work but many do not.

Afterwards the macro looks for weeks with the state 'new' and does a doReload. As far as I can tell this reload calls the same commands as above again which is not a problem for me or my desktop application. On the contrary the server freezes at this point. Logging is enabled and 2 logs are created. The first one shows a completed partial reload routine. The second one stops at the odbc connection call:

...

05.01.2016 11:37:00: 0011  SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So'

05.01.2016 11:37:00: 0013  SET hideprefix = '~'

05.01.2016 11:37:00: 0016  ODBC CONNECT64*XUserId*XPassword*

*EOF*

At this point the application still shows the dialog of the partial reload until it becomes a white rectangle overlaying the application elements. The task manager shows an application of about 2GB in the beginning running very slowly down to 65mb over 10min. It looks like the server is having problems opening the connection for a second time. Is there a way to convince it otherwise (or better securely close the first one after the initial partial reload)?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

Ok it looks like I found the problem:

I did the reload with ActiveDocument.DoReload, which looks like a newer, non depricated version of ActiveDocument.Reload according to the api. Yet it does not work since new year's eve. Trying ActiveDocument.Reload instead made the execution run again .... very annoying but anyways..

View solution in original post

1 Reply
Not applicable
Author

Ok it looks like I found the problem:

I did the reload with ActiveDocument.DoReload, which looks like a newer, non depricated version of ActiveDocument.Reload according to the api. Yet it does not work since new year's eve. Trying ActiveDocument.Reload instead made the execution run again .... very annoying but anyways..