Page 1 of 2 1 2 >
Topic Options
#55263 - 09/07/17 06:05 AM VBscript not working with high volume of data
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi there

I have two processes - Main and Batch.

Process Main:
-12 different scripts in VB.
-System variables (%1- %9) to retrieve information from input files.
-Operations on files and file sent to the output folder which is the capture folder for Batch Process

Process Batch:
-About 3 scripts in VB
-System variables (%1- %9) to retrieve information from input files.

This process worked fine but a few weeks ago something went wrong.
When we send data (about 45k text files) then one of the script in Process Main does not work. It does operations for the first couple of files and then for the rest not. I have checked log file - there is info "script run successfully" and occasionally few times I saw "ERROR: W3602 : Error 0 on line 1, column 1: Microsoft VBScript compilation error: Out of memory".
I deactivated Batch process and I send files once again to the Main process. It was ok. When all files were processed I swiched on the Batch process and final output was fine. But I cannot do that every time - it is babysitting work.

Another problem is that an error occurs only on our Live server when I have tried to repeat the same error on the test server, I could not - everything was fine on the test server.

Is it something wrong with VB interpreter/compiler or Windows server or Planet Press itself? We used this process for a good few years.

I was thinking about reinstallation of Planet Press - we have a version 7.6.1 on Windows 7. Is it a good idea?

thanks for any advice
Simon

Top
#55264 - 09/07/17 08:12 AM Re: VBscript not working with high volume of data [Re: SSimon]
MartinS Offline
OL Guru

Registered: 08/06/12
Posts: 106
Loc: Munich
I suspect it's an issue with the operating system (as you cannot replicate on a different server).
What does the script where it fails do? Is there really a huge memory allocation by the Workflow services at that moment?
It sounds to be an issue with running too much scripts at the same time.
Does it happen even with a small single data file?
I don't think it's an issue with PlanetPress itself, but you may try to repair PlanetPress just to be sure.

Top
#55265 - 09/07/17 10:35 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Thanks for that.
This script divides whole text file using \f and moves structure one line down. I know that something went wrong because the structure of the file has not been changed.
In Live, I have dual core and 32 GB and I have a problem on the test server there is dual core with 5GB and we do not have a problem. Processes are the same on Live and on the test server. Files are not veeery big from 19KB to 600KB. There is no problem with one single file.

You mentioned repair. Do you know if I need to move my license if I do a repair of Planet Press?

Top
#55266 - 09/07/17 11:21 AM Re: VBscript not working with high volume of data [Re: SSimon]
MartinS Offline
OL Guru

Registered: 08/06/12
Posts: 106
Loc: Munich
A repair does not impact on the license as it does not change the magic number.

Are the processes self-replicating?

Top
#55267 - 09/07/17 11:51 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
No, processes are not self-replicating. Regards

Top
#55276 - 09/11/17 08:48 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi there

I am planning to repair Planet Press on Friday afternoon. But in the meantime, I found a Windows Event Log entry which can be helpful I belive:

Faulting application name: PPWatchService.exe, version: 7.6.1.9352, time stamp: 0x2a425e19
Faulting module name: oleaut32.dll, version: 6.1.7601.23775, time stamp: 0x58f4db68
Exception code: 0xc0000005
Fault offset: 0x000047bd
Faulting process id: 0x1c6c
Faulting application start time: 0x01d2f4d666f63f5a
Faulting application path: D:\Program Files (x86)\PlanetPress Suite 7\PlanetPress Watch\Bin\PPWatchService.exe
Faulting module path: C:\Windows\syswow64\oleaut32.dll
Report Id: 755d4d43-60ca-11e7-95dd-005056904acc

Does any of the above ring bells with anyone?

Top
#55333 - 09/25/17 06:00 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi Martin

I increased the number of CPU cores from 2 to 4. Memory is 8GB at the moment. I have repaired Planet Press and no luck.

Regards
Simon

Top
#55334 - 09/25/17 06:55 AM Re: VBscript not working with high volume of data [Re: SSimon]
Hunt3r Offline
OL Newbie

Registered: 02/13/17
Posts: 13
Hi,

I cannot help with a solution, but we have a similar issue on one of our server. After the main process finish its job (with big data, 3-4 hours of processing), the next job will fail with out of memory error (although it happens when we want to get the data from the XML with plugin). The file is only 500 kb. Moreover, the folder capture plugins became unresponsive until we restart the system. The interesting part is that the main process can load and split the 20-30 MB XML without problem.

We have already reduced the log level, it also blocked the next process until it writes all logs (15 min+).

I think one of Windows settings cause these problems, but we cannot find it yet.


Edited by Hunt3r (09/25/17 06:55 AM)

Top
#55335 - 09/25/17 08:19 AM Re: VBscript not working with high volume of data [Re: SSimon]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
@SSimon: can you post the code that fails?
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#55338 - 09/25/17 09:45 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi Hunt3r

Thanks for your help. I will try to do the same with the log level. Unfortunately, it is our production server so, I can do my test in the evening. I will let you know.

Regards
Simon

Top
#55339 - 09/25/17 10:13 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi Philippe

There are 1700 lines of code. If you send me on private message with your email address I will be able to send you the test script or even a whole configuration.

Regards
Simon

Top
#55341 - 09/25/17 01:58 PM Re: VBscript not working with high volume of data [Re: SSimon]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
Remember that the Scripting task in Workflow instantiates the Windows Scripting Engine, so it's not a custom engine we embedded inside the application but rather just a call to the OS-provided engine. Issues with code that has been working for a while but that suddenly stops working could be a reflection of , for instance, increased volume or size of the jobs being processed the the Windows Engine is unable to handle.

As a general pointer, though, you should pay particular attention to how you use external objects (XMLDOM, FileSytemObject, WMI, etc). These may not always be suited for use inside a highly threaded environement like workflow.

I unfortunately can't pour through 1700 lines of code, I do have a job to atend to... smirk ... But it's probably safe to assume that if you need 1700 lines of code to achieve what you want to do, then the memory issue most likely lies with that code.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#55342 - 09/26/17 05:37 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi Hunt3r/Philippe

Thank you for your help and suggestions.

I have already reduced the log level, but no luck.

I have also set all outstanding objects in VBscript to Nothing, no luck.

After my tests, I am pretty sure this is a problem with VBScript. In both processes, I have a VB script plugins. When I turned off script plugins in the second process
everything was ok in the first process - no error occurred.
When I turned on all script plugins back, the problem has appeared again.

We did not have this problem before and we do not have this problem on our test server.

Regards
Simon

Top
#55344 - 09/26/17 09:16 AM Re: VBscript not working with high volume of data [Re: SSimon]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
Setting the objects to nothing won't change anything becasue VBScript's garbage collector already takes care of that efficiently. However, if you are using ActiveX Objects (through the CreateObject()) method, then some of those objects may not be thread-safe. That depends on the version of Windows you're running, which updates were installed, what drivers were updated, and so on.

For instance, there are several versions of the Microsost.XMLHTTP available, just like there are different versions of the DAO/ADO/OLEDB drivers. Those would be the prime suspects, along with application objects like Microsoft.Excel or Microsoft.Word.

If you are using an Access Database, the drivers used to access that DB are notoriously flaky in multi-threaded environments.

I am not pointing the finger at any particular object, just attempting to give you pointers to help you determine what could cause the issues you're running into.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#55350 - 09/26/17 12:49 PM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi again

I have compared once again processes on the Production server and Test Server. On prod serv I have noticed that during processing files memory for process PPWatchService.exe*32 was increasing per every file - which should not. As on the test server, Memory was all the time between 100K and 110K.

In terms of the objects in Vbscript I use FileSystemObject and
ADODB for MS Access only. But I switched off MS access VBscripts and the error was still there.

Regards
Simon

Top
#55353 - 09/26/17 03:35 PM Re: VBscript not working with high volume of data [Re: SSimon]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
At this stage I suggest you open a ticket with our Support team as this will probably require more hands-on investigation than what we can provide through this forum.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#55357 - 09/28/17 06:03 AM Re: VBscript not working with high volume of data [Re: SSimon]
SSimon Offline
OL Newbie

Registered: 09/05/17
Posts: 14
Loc: Ireland
Hi Philippe

I have opened a ticket and I am waiting for a response now.
Thank you for your help.

Regards
Simon

Top
Page 1 of 2 1 2 >