Out of Memory Errors during PDF report generation

Avatar
  • updated
  • Fixed
Using WLE 7.1 Professional, Server 2003 system, getting an "out of memory error" during one of the reports in a scheduled list. This error only shows up on screen if I run the report manually. If using the Scheduler, the report process hangs without errors (no errors in Windows Event logs either).

If I kill the WLExpert process, the Scheduler restarts again, but the error reoccurrs, and the rest of the reports in that Scheduler 'group' do not run.

I have downloaded the latest version (today) and reinstalled, memory problem still occurs.
Avatar
Rick
I ran the report manually, watching the WLEXPERT process in Task Manager. During the PDF generation, around 2-3% completion, there was about 520MB memory used until the 'out of memory' error occured.

I ack'd the error message, and the PDF file generation completed. The resultant PDF file was 269KB. The PDF completed to the point of "Access Statistics, Directories" section (112 items shown, with the totals row completed).

Doesn't appear that the program can utilize up to 2GB of RAM.
Avatar
Michael
I think that the error could have appeared when the program tried to generate a very large table or chart and tried to allocate a huge amount of memory to do it so it required too much memory even while only 520MB was used by the program.

You should check the amount of items set for the reports, especially for grouped reports like "Pages and Queries" as they could cause the reports to become very large. You should also decrease number of tracked files as this can also help to generate the report successfully in this case. If it doesn't help to fix the issue in this case, could you please send your configuration and generated HTML report for this profile to support@weblogexpert.com? You can save the configuration using the File > Backup command.

We'll add additional checks for size of PDF reports to avoid such "Out of memory" errors in the near versions of the program. When the program detects that the report is too large to be generated, it will show an error message with explanation of the issue and recommendations on how to fix it. The scheduler will also continue to process other profiles when if such issue occurs for one of them.
Avatar
Michael
The issue appears if a PDF report is too large to be processed by the program. In most cases it occurs when there is a very large number of tracked files as detailed information on each such file is saved to the report.

You should check if there are a lot of tracked files in the profile that causes the problem. If you use a wildcard to track all pages or all files, you should consider replacing it with few tracked files you need detailed statistics on.
Avatar
Rick
I can check the number of tracked files in the profile.

But the program should be able to recover from such a problem when a series of reports are run via the Scheduler. If a report develops such a problem (for the first time, after that report has successfully completed prior times), then there is no notification anywhere about the problem report.

If you look at the Scheduler log, there is just the message that the Scheduled group of reports has started. In the case of this error, the group of reports had run just fine for over a month, so I am not checking for the reports' completion. Then one report fails, locking up the Scheduling process, which can't recover from the out of memory error, so any other reports in that group are not run.

Scheduler should be 'smart' enough to respond to an error in a particular program. It should cancel that particular report, write an error message to the Scheduler log file, send an email to the report administrator, and then continue with the other reports in that Scheduler group.

Right now, the only way that I can determine if an error occurs is to manually check all reports to see if the files were updated (by looking at the file modification times). This is not good. I can't even tell from the Scheduler log which report caused the problem -- I have to manually look at all the generated report files to find non-updated report files.
Avatar
Rick
...in addition, I manually ran the same report (without any changes), and the report ran just fine (HTML and PDF). But when the report is included in the Scheduled group, the report fails with 'out of memory',

The server has 4GB RAM, and monitoring the memory usage during the Scheduled report generation, the memory used value never gets above 20%.
Avatar
Michael
The built-in scheduler can process almost all errors during analysis correctly - it writes information on error including failed profile name to the schedule log and continues processing other profiles. However, it cannot handle the out of memory error when generating PDF reports now.

There shouldn't be problems with genersting HTML reports for the profile as these profiles requires much less memory. I recommend you to check how much memory the program uses if you analyze the profile manually and create the PDF report (you should check the amount of memory used - Private Working Set - for the WLExpert.exe process in Task Manager). As the program is a 32-bit application, it can use up to 2GB of RAM.

BTW what is the size of the generated PDF report and how many pages does it contain?
Avatar
Michael
We have added additional checks for size of PDF reports in version 7.3 beta so the program should show an error message instead of crashing when reports are too large to be generated.