Skip to Content

Memory issues when running on Window server 2016.

Hello world!

I've been working with the same Crystal Report reports for my customer since 2001 so over the years I've been facing different issues when the customer's demands have changed when it comes to performance and size but also when it comes to migrating to newer versions of OS/DB/Crystal/VS. I've managed to solve the issues over the years but this time I really need help.

Today we run Crystal Reports 2011, Crystal 32-bit runtime .08. Windows server 2008 64-bit, Oracle 11, VS2015(C#) and we are now migrating to Windows server 2016 and Oracle 12 (not changing CR or VS). The problem we now get is that the RAM for the allocated process rapidly (after about 10-20 seconds) reaches the point of 1,4GB where the process abruptly terminates without any error message. The termination is normal since the limit is 1,4GB so that is not my concern. My concern is that when generating the same report in the old setup, the process only allocates about 300MB and then succeeds. I have tested to run one of our smaller reports and they do succeed in the new setup but they use a lot more RAM than compared to if I run it in the old setup. So something is really wrong here when it comes to Crystal allocating way too much RAM in the new setup.

What I've tried so far:
- Running the same setup but on Windows server 2012 64-bit instead and it works the same as on 2008 (fine). So maybe server 2016 is the problem?
- Running the same setup but pointing server 2016 to oracle11 instead and it still doesn't work. So maybe server 2016 is the problem?
- Running the old setup but pointing to an oracle12 instead and it works fine. So maybe server 2016 is the problem?
- Excluding our C#-code and instead installing the Crystal Reports 2011 directly on the 2016 server and try to load the data directly. Exactly the same behaviour. Crystal Reports terminates after "Reading records" (no of records are increasing in the status bar) for about 10-20 seconds while the crystal process rapidly increases RAM-wise. I've tried it several times and every now and then the report is loaded in the background but far from all pages. I guess it shows the data that was read before the process terminated.
- Installing Crystal Report 2016 directly on the server and also upgrading to the latest runtime (.24) but we get exactly the same behaviour as with 2013/.08.
- I've checked that temp-files are written in c:\windows\temp so the process seem to have access to that specific folder.

I've also been thinking about if it's related to any policy in server 2016 but I have no clue what to change.

I get the same behaviour on 3 different 2016-servers so if something is incorrectly configured, it on all 3 of them.

So folks, any ideas of what to do and try/test are very appreciated because since after the last days of thinking/testing/googling I've run out of ideas.

Best regards,

Daniel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 17, 2018 at 06:45 PM

    ...and now it seems to be solved! We found this:

    https://stackoverflow.com/questions/49122126/oracle-oledb-memory-leak-12-2-and-greater-ssis-and-c


    So we thought, why not try it out? What we did was to downgrade to oracle client 12.1 and tadaaaa, no more problems :-)


    Thanks for your efforts!

    Totally btw, we create reports up to about 10 000 - 15 000 pages occassionally using the edit bin pre-build i visual studio which gives the process 3,5GB available RAM instead of normally 1,4GB. Just for your info :-)

    Best regards,

    Daniel

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 12, 2018 at 03:04 PM

    When you say "Crystal 32-bit runtime .08", do you mean SP 8 of the Crystal for VS runtime? If so, that may be the issue as that is an old version (it's now on SP24) which may not work correctly on Windows Server 2016. I suggest downloading the latest version of the SDK, recompiling your software with it, installing the new runtime on the server, and testing to determine whether that resolves the issue. You cannot just install the new runtime because there have been a number of changes to how the SDK works so that code compiled with older versions will not work with the latest runtime.

    If you go to https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads you'll find a link to the site where you can download the latest. Be sure to read the information on this page because it will outline any changes you need to make in your code. When you get to the download page, use the orange button to download the integration with VS and the appropriate blue button to get the runtime install for use when deploying your app.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 13, 2018 at 04:23 PM

    Wow, that's a new one... CR for VS has been supported on Windows 2016 Server since SP 19

    Is this a Windows Desktop or WEB app?

    Since it happens in both runtime and CR Designer it's suggesting possibly some folder ( \USER\Temp) folder does not have full read/write rights.

    When connecting to the dB CR will generate temp files to hold sorting and other info in it, if that folder has been limited without write permissions then we may start filling up memory, just a guess since I've never seen this before.

    Go to your temp folder:

    C:\Users\%USER%\AppData\Local\Temp

    Delete everything in it first, 5 or 6 files likely to be locked so skip them. Run a report and see if the temp file are created, close the report and those temp files should be deleted.

    You can also try running CRD and your App.EXE by right clicking on them and selecting Run As Administrator and see what happens.

    I'll ping the other guys to have a look and see if they have any suggestions...

    Save the report with data on a working OS and then try opening it up on your Windows 2016 and see what happens. That will remove the problem with CR connecting to the DB driver, CR will save the save in the RPT file.

    If that works it's likely the Oracle Client causing the issue.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Hi again!

      - Your Q/comment: Is this a Windows Desktop or WEB app?

      A: Win desktop

      - Your Q/C: Delete everything in it first, 5 or 6 files likely to be locked so skip them. Run a report and see if the temp file are created, close the report and those temp files should be deleted.

      A: When I run a small successful report I can see temp-files created and deleted. A failed report on the other hand leaves them behind in the temp-dir.

      - Your Q/C: You can also try running CRD and your App.EXE by right clicking on them and selecting Run As Administrator and see what happens.
      A: Same behaviour.


      - Your Q/C: Save the report with data on a working OS and then try opening it up on your Windows 2016 and see what happens. That will remove the problem with CR connecting to the DB driver, CR will save the save in the RPT file.

      A: If I save the report "with data" in CRD on win2008 and then open it on win2016 there are no issues. No crash. All pages included.


      Your Q/C: If that works it's likely the Oracle Client causing the issue.

      A: Yes, could be. The failure arises while "reading records". Which is the recommended provider when running win2016 and ora12.2?.


      Best regards,
      Daniel