Forum Stats

  • 3,760,355 Users
  • 2,251,692 Discussions
  • 7,871,075 Comments

Discussions

SQLcl Using a lot of memory

fbaf52ff-ecac-4ed4-a3d4-d4ea39c32078
edited Sep 28, 2018 2:35PM in SQLcl

Good day,

I have an issue that I just can't figure it out why. If you can help me or give me idea I will greatly appreciate it.

I have a script that uses SQLcl that constantly spooling data from the database, it works fine, but as times goes by, the java session start to consume more and more memory. Currently what I do is, I kill the session and start again so it will free the memory on my computer, but I will like to find a way of just continue using the same session without closing it for days.

Any suggestions??

the version I am using is:

SQLcl: Release 17.3.0.256.1818 Production

Eduardo Zamora

Tagged:

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,782 Bronze Crown
    edited Sep 28, 2018 2:31AM

    java merory leakage possibly.

    try upgrading to latest.

    Also it is not at all clear, as you havn't shown, what exactly it is you are doing.

  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited Sep 28, 2018 2:35PM

    Since you are spooling, I thought perhaps you might be getting tripped up by not having

        SET TRIMSPOOL ON

    in combination with

        SET LINESIZE <some_large_value_bigger_than_required>

    But when I run a test SQL with an actual output line length of 234 (with linesize of 256 versus 1024 in two test runs), there seems to be no difference (tested only on 18.2) in output file size (about 5 MB per run) or allocated memory peak (seen in Task Manager).  So SQLcl does more for us in terms of reducing output size (if not memory usage) than SQL*Plus would do with the same settings.

    So probably the point about a memory leak mentioned by Gaz is correct but, as he says, you should provide more information about your specific case.