Massive memory consumption resulting in massive page file

Platform: Windows XP on Dell precision M60. I GByte RAM, Oracle 10g (10.0.2), Oracle Http Server, APEX 3.1.1
Have a page which runs sql query ..
select
AS_SEEN_ON_ACW(:P51_MESSAGE, :P51_text_col, :P52_backgnd_col) AS "TEXT"
from DUAL
The functions in the database are defined as follows:
create or replace function decimal_to_hex (i_decimal in integer)
return varchar2 as
v_result varchar2(12);
v_hex_digit varchar2(1);
v_quotient integer;
v_remainder integer;
begin
if (i_decimal < 10) then
v_result := to_char(i_decimal);
elsif (i_decimal < 16) then
v_result := chr(65+(i_decimal-10)); -- or 55 + idec
else
v_remainder := mod(i_decimal,16);
v_quotient := round((i_decimal - v_remainder) /16);
v_result :=
decimal_to_hex(v_quotient) ||
decimal_to_hex(v_remainder);
end if;
return v_result;
end decimal_to_hex;
CREATE OR REPLACE FUNCTION HTMLCOLORCODE(V_RESULT IN VARCHAR2)
RETURN VARCHAR2 AS
V_LENGTH INTEGER;
R CHAR(2);
G CHAR(2);
B CHAR(3);
RGB VARCHAR2(12);
TEMP VARCHAR2(12);
BEGIN
v_length := LENGTH(V_RESULT);
if v_length < 1 THEN TEMP := '000000'||V_RESULT;
elsif v_length < 2 THEN TEMP := '00000'||V_RESULT;
elsif v_length < 3 THEN TEMP := '0000'||V_RESULT;
elsif v_length < 4 THEN TEMP := '000'||V_RESULT;
elsif v_length < 5 THEN TEMP := '00'||V_RESULT;
elsif v_length < 6 THEN TEMP := '0'||V_RESULT;
else temp := v_result;
end if;
-- right now invert the rgb
R := SUBSTR(TEMP, 5, 2);
G := SUBSTR(TEMP, 3, 2);
B := SUBSTR(TEMP, 1, 2);
RGB := R||G||b;
RETURN RGB;
END;
CREATE OR REPLACE FUNCTION AS_SEEN_ON_ACW(MESSAGE IN VARCHAR2, TEXT_COL NUMBER, BACKGROUND_COL NUMBER)
RETURN VARCHAR2 AS
TEMP VARCHAR2(4000);
WIDTH NUMBER := 640;
HEIGHT NUMBER := 480;
BEGIN
TEMP := '<TABLE border="0" width="'||WIDTH||'" height="'||HEIGHT||'" style="background-color:#'||HTMLCOLORCODE(decimal_to_hex(BACKGROUND_COL))||'" ><td width="100%"><p style="font-family:Arial;font-size:40;color:#'||HTMLCOLORCODE(decimal_to_hex(TEXT_COL))||'">'|| replace(message,'$','<br>') ||'</p></td></table>';
RETURN TEMP;
END;
When the page loads, the oracle.exe process memory goes through the roof.

Hello,
There appears to be no error checking in those three procedures, when you used P52_backgnd_col and that value didn't exist then the 3rd parameter to your AS_SEEN_ON_ACW procedure would be NULL, this in turn is passed to the decimal_to_hex procedure (which again has no error checking and will not handle it correctly).
By the way, you can use the <code></code> (use square brackets) to make your code much more readable, I had to reformat it to see what it was doing.
Hope this helps,
John.
http://jes.blogs.shellprompt.net
http://www.apex-evangelists.com

Similar Messages

  • Page File Article

    Here is an excellent article IMO. It even addresses the Out of Memory problem.
    http://tinyurl.com/4zoqn
    Mel

    I just read the article... I am still confused as to what my system is doing...
    I have 2gig of physical memory. I have my page file set as described. When in LR only about 200-300 mb of physical memory gets used, but hundreds of mb of page file gets used. And monitoring the task manager while using LR I see that the physical memory usage stays about the same but the page file goes up in usage by several hundred MB. I still have (right now) 1.45 GB of physical memory available- But Windows keeps using the page file when ever LR asks for more memory!
    UGH... I am not sure what to do. If I am not running out of physical memory than virtual memory usage should stay low but it is not.
    Any ideas?
    EDIT- I just looked a little closer, when memory needs go up it will use a little bit more physical (a few MB) but no where near enough.

  • I get unwanted massive page downloads to my download PDF file every time I attempt to download something I want; this download takes over my MacBook and I have to force quite to stop the download.

    This started happening after I attempted to download my property tax report from the county. I will get the page I actually wanted to download but I also get page after page of unwanted material downloaded to my MacBook. The only way I can stop the massive page download is to force quite the MacBook and then restart it and delete all the unwanted pages.

    I have updated my firefox files as directed, is there anything else I can or should do?

  • Consumption of a lot of page file space with Solution Manager over windows

    HI guys,
    I have installed Solution Manager 4.0 SP10 over Windows 2003 Server, Standard Edition. The server has 4 Gb of RAM and 10Gb of page file.
    Before to start Solution Manager the memory used is 500Mb and the used page file is 1Gbytes, but when I start Solman, the memory used grow up to 3.8 Gbytes and the pagefile to 7Gbytes.
    Is this behaviour normal?, should I need near to 8Gb to run SolMan in memory?
    does someone experience or tips regarding this is issue?
    Thanks in advance for your comments guys!!!!
    Regards Carlos Pozo.

    Hi Ragu,
    All SAP guides talk about aprox. 10Gb in Win and aprox. 20Gb (max.) in Unix.
    You are right (also....;-)   ), but my question is regarding the consumption of this page file, for example, we have XI 3.0 installed in AIX (ABAP+JAVA like Solman), and we have 8 Gbytes of RAM installed, in scenario we have in average 1.5Gbytes of free memory and not swap space used, that means in average XI use 6,5 Gbytes of memory (including DB instance, oracle 9.2), with at least 15 users connected, in contrast Solman has only one user connected and only 6 dialog wp and use almost 10Gbytes (adding RAM and SWAP space).
    Is normal that Solman 4.0 need so much memory to run?
    Do you know some way to decrease the swap consumption?.....
    I know, I know.......I'm asking almost for magic solutions......  

  • High Page Reads/Sec on Windows 2008 R2 64-bit running on VMware but very low Real Memory & Page file Usage.

    Hello All,
    Below is the server configuration,
    OS: Windows 2008 R2 Enterprise 64 Bit
    Version: 6.1.7601 Service Pack 1 Build 7601
    CPU: 4 (@ 2.93 GHz, 1 core)
    Memory: 12 GB
    Page file: 12 GB
    1. The actual utilization, be it a 15 minute sample, hourly, weekly etc, the utilization of real memory has never crossed 20% and the page file usage is at 0.1%. For some reason, the Pages/Sec>Limit% counter reports 100% continuously regardless of the
    sampling intervals. Upon further observation, the Page Reads/Sec value is somewhere between 150~450 and Page Input/Sec is somewhere between 800~8000. Does this indicate a performance bottleneck? (I've in the interim asked the Users, App. Owners to see if they
    notice any performance degradation and awaiting response). If this indicates a performance issue, please could someone help list down how to track this down further to which process/memory mapped file is causing it? and what I should go about performing to
    fix this problem please?
    p.s., initially the Security logs were full on this server and since page file is tied to Application, Security and System logs, this was freed up to see if this is causing the high page reads but this doesn't.
    2. If the above does not necessarily indicate a performance problem, please can someone reference few KB articles that confirms this? Also, in this case, will there be any adverse effects if attempting to fine tune a server which is already running fine?
    assuming App. Owners confirm there isn't any performance degradation.
    Thanks in advance.

    Hi,
    Based on the description, we can try to download Server Performance Advisor (SPA) to help further analyze the performance of the server. SPA can generate comprehensive diagnostic reports and charts and provides recommendations to help you quickly analyze
    issues and develop corrective actions.
    Regarding this tool, the following articles can be referred to for more information.
    Microsoft Server Performance Advisor
    https://msdn.microsoft.com/en-us/library/windows/hardware/dn481522.aspx
    Server Performance Advisor (SPA) 3.0
    http://blogs.technet.com/b/windowsserver/archive/2013/03/11/server-performance-advisor-spa-3-0.aspx
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Exchange 2010 personal archive database massive log file generation

    Exchange Server 2010 SP3 + Update Rollup 4
    Windows Server 2008 R2, all updates
    VMware ESXi 5.5
    Server config: 2 x Xeon Quad Core 2.20GHz, 16GB RAM
    We recently started using personal archives. I created a database for this purpose ("Archive Mailboxes") on the same datastore as our live mailbox database ("Live Mailboxes"). It works great except that the mailbox maintenance generates
    massive amounts of log files, over 220GB per day on average. I need to know why. The Live Mailbox database generates around 70GB of log files every day. The database sizes are: Live = 159.9GB, Archive = 196.8GB. Everything appears to be working fine, there
    are no Error events related to archiving. There are 10025 MSExchangeMailboxAssistant warning events logged every day. I have moved those mailboxes back-and-forth to temp databases (both Live and Archive mailboxes) and the 10025 events have not stopped so I'm
    reasonably certain there is no corruption. Even if there were it still doesn't make sense to me that over 100 log files are generated every single minute of the day for the Archive store. And it's not that the database isn't being fully backed up; it is, every
    day.
    Do I need to disable the 24x7 option for mailbox maintenance to stop this massive log file generation? Should I disable mailbox maintenance altogether for the Archive store? Should I enable circular logging for the Archive store (would prefer to NOT do this,
    though I am 100% certain we have great backups)? It appears to me that mailbox maintenance on the Live store takes around 12 hours to run so I'm not sure it needs the 24x7 option.
    This is perplexing. Need to find a solution. Backup storage space is being rapidly consumed.

    I'm sure it will be fine for maintenance to run only on weekends so I'll do that.
    We use Veeam B&R Enterprise 7.0.0.833. We do not run incremental backups during the day but probably could if necessary. All this is fine and dandy but it still doesn't explain why this process generates so many logs. There are a lot of posts around
    the internet from people with the same issue so it would be nice to hear something from Microsoft, even if this is expected behavior.
    Thank you for the suggestions!

  • Printing pages file makes different result.

    I made pages file like this.
    however, if i print it by pdf, the result is different like this.
    if i print it on paper, the result is same with pdf one.
    Do you have any idea?

    It seems like that the subscript causes the problem....

  • Converting PPT file to PDF results in cover page disappearing -- using 10.1.3 Reader for Mac

    converting PPT file to PDF results in cover page disappearing -- using 10.1.3 Reader for Mac

    Adobe Reader cannot convert documents; what software did you use for the conversion?

  • Disable Virtual Memory/Page File/Paging File Via Group Policy

    We have several machines running Windows Server 2012 and we wanted to disable the paging file using Group Policy.  It took a while to find the answer but I got it working and I wanted to share with you how this is done.  First of all, to do this
    manually, you would need to follow these steps:
    1)Right-click Computer, select Properties.
    2)Click on Advanced System Properties
    3)Choose the Advanced tab
    4)Under Performance, click the Settings... button
    5)Choose the Advanced tab
    6)Under Virtual Memory, click the Change... button
    7)Choose No paging file
    Obviously this process is cumbersome just for one system let alone a dozen or more.  To take care of this automatically using Group Policy, you will need to do the following:
    1)Create a GPO, then go to the Group Policy Management Editor
    2)Navigate to Computer Configuration>Preferences>Windows Settings>Registry
    3)Create a new registry item using the following settings:
    a: Action: Replace
    b: Hive: HKEY_LOCAL_MACHINE
    c: Key Path: SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    d: Value Name: PagingFiles (do not check the Default option)
    e: Value type: REG_MULTI_SZ
    f: Value data: 0x10000
    There is no specific setting in group policy to disable the paging file, so you must instead follow these procedures to allow group policy to modify a registry key in Windows.  I tested it out on a Windows 7 computer and a Server 2012 machine. 
    No reboot was required, just a simple gpupdate /force command in CMD.  Good luck, and don't forget to test it first!  Not all systems or environments are created equal.
    tags: page file, paging file, virtual memory, pagefile, pagingfile, virtualmemory, pagingfiles

    > disable the paging file
    Not supported by Microsoft... On all SKUs.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • HELP!, i had a massive pst file, i did not realize how massive, it is messing up everything and I want to "unimport" the pst, it is overwelming the server

    I have a monzilla email account. I had a massive pst file, six years worth from another computer. When I imported this file I did not realize how massive it was,
    I want to disconnect this pst from my monzilla account, how do I do that. I keeps down loading thousands of emails to the server and is crashing, locking up, the server exceeding "quota".
    I need to kill it now please.
    Thanks,
    Mark
    <i>This is a public forum! Personal info removed by moderator. Read the [[Forum rules and guidelines]]</i>

    Is your question related to Thunderbird?

  • High memory consumption in XSL transformations (XSLT)

    Hello colleagues!
    We have the problem of a very high memory consumption when transforming XML
    files with CALL TRANSFORMATION.
    Code example:
    CALL TRANSFORMATION /ipro/wml_translate_cls_ilfo
                SOURCE XML lx_clause_text
                RESULT XML lx_temp.
    lx_clause_text is a WordML xstring (i.e. it is a Microsoft Word file in XML
    format) and can therefore not be easily splitted into several parts.
    Unfortunately this string can get very huge (e.g. 50MB). The problem is that
    it seems that CALL TRANSFORMATION allocates memory for the source and result
    xstrings but doesn't free them after the transformation.
    So in this example this would mean that the transformation allocates ~100MB
    memory (50MB for source, ~50MB for result) and doesn't free it. Multiply
    this with a couple of transformations and a good amount of users and you see
    we get in trouble.
    I found this note regarding the problem: 1081257
    But we couldn't figure out how this problem could be solved in our case. The
    note proposes to "use several short-running programs". What is meant with
    this? By the way, our application is done with Web Dynpro for ABAP.
    Thank you very much!
    With best regards,
    Mario Düssel

    Hi,
    q1. how come the Ram consumption is increased to 99% on all the three boxes?If we continue with the theory that network connectivity was lost between the hosts, the Coherence servers on the local hosts would form their own clusters. Prior to the "split", each cache server would hold 1/12 of the primary and 1/12 of the backup (assuming you have one backup). Since Coherence avoids selecting a backup on the same host as the primary when possible, the 4 servers on each host would hold 2/3 of the cache. After the spit, each server would hold 1/6 of the primary and 1/6 of the backup, i.e., twice the memory it previously consumed for the cache. It is also possible that a substantial portion of the missing 1/3 of the cache may be restored from the near caches, in which case, each server would then hold 1/4 of the primary and 1/4 of the backup, i.e., thrice the memory it previously consumed for the cache.
    q2: where is the cache data stored in the coherence servers?on which memory?The cache data is typically stored in the jvm's heap memory area.
    Have you reviewed the logs?
    Regards,
    Harv

  • Why haven't my Pages files restored after a backup?

    Ok.  I have an ipad 2. I use icloud to back up my important stuff, particularly Pages files.  Today I made the MASSIVE mistake of updating my os.  This killed my ipad & I have had to restore.  No problem I thought. I go to restore & get a 'not all things can be restored' type message.  Not bothered about my games; but Pages, an app I paid for and backup, is wiped. Not a trace of any files.
    How can I get them back?
    Is there an Apple way to do it?
    many thanks

    Please amend your signature to show you are using Lion - having the wrong system showing can lead to some irrelevant answers.
    Your iDisk and its contents, including websites and Gallery, do not migrate to iCloud: iCloud does not provide these facilities. The iDisk will continue to work as before but will terminate on 30 June 2012 and its contents be deleted, so you will need to find alternatives before then.
    The migration process has probably logged you out of MobileMe and you will need to go to System Preferences>MobileMe and sign in again.
    This article examines alternatives to the facilities iCloud does not provide:
    http://rfwilmut.net/migrate

  • Page file issue

    hello team,
    We have a weird issue running on one of the servers(w2k8 R2 ENt) where the page file is not getting saved on the reboot..i.e we set a value for page file 0f 200GB via GUI and the registry key also shows to be same..but on reboot of the server the value gets
    chnaged to random numbers i.e sometime 25Gb or 45Gb and registry keys shows the same vaule as 200GB..
    Anyone who faced such issue and any fix available for it.
    Tried number of things:
    Cleaned page file with option set to none..system rebooted..page file set to 200GB..on next reboot the value changes
    Set it to automatic and then set the values back but on reboot the value chnages
    Clean page file at shutdown
    Sfc scan 
    tried setting page file via command line but to no go
    saving the page file by another name pagefile1.sys/pagefile2.sys..
    No options seem to be working...
    ManeeshB

    Hi ManeeshB,
    Could you refer the following KB to use PowerShell cmdlet to set the pagefile then monitor this issue again.
    Configure memory dump files for Server Core installation options of Windows Server 2008
    https://technet.microsoft.com/en-us/library/ee424384(v=ws.10).aspx
    The related KB:
    Best Practices for Page File and Minimum Drive Size for OS Partition on Windows Servers
    http://social.technet.microsoft.com/wiki/contents/articles/13383.best-practices-for-page-file-and-minimum-drive-size-for-os-partition-on-windows-servers.aspx
    Please refer the following KB to confirm you have not use the “Clear virtual memory pagefile when system shuts down” Group Policy:
    Clear virtual memory pagefile when system shuts down Group Policy
    http://support.microsoft.com/kb/320423
    More information quote from Windows Internals.
    What triggers the file to grow?
    Page file grows as the system needs additional memory to satisfy the memory pressure load being placed on it by the software running on the system.
    What triggers the file to shrink?
    If the Paging file(s) have increased from the minimum as a result of memory load the system will shrink the paging file provided there is space for a sufficient number of free
    pages still left after the shrinking for a sudden need of page file space. 
    The check to determine if the paging file can be reduced is performed when a process exits. 
    I’m glad to be of help to you!
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Continuously refreshing a tab after an interval leads to high memory consumption (400MB to 800MB in 30 seconds for 3 refreshes at 10 secs interval), why?

    Environment:
    MAC OSX 10.9.5
    Firefox 32.0.3
    Firefox keeps consuming lot of memory when you keep refreshing a tab after an interval.
    I opened a single tab in my firefox and logged into my gmail account on that. At this stage the memory consumption was about 400MB. I refreshed the page after 10 seconds and it went to 580MB. Again i refreshed after 10 seconds and this time it was 690MB. Finally, when i refreshed 3rd time after 10 seconds, it was showing as 800MB.
    Nothing was changed on the page (no new email, chat conversation, etc. nothing). Some how i feel that the firefox is not doing a good job at garbage collection. I tested this use case with lot of other applications and websites and got the similar result. Other browsers like Google chrome, safari, etc. they just work fine.
    For one on of my application with three tabs open, the firefox literally crashed after the high memory consumption (around 2GB).
    Can someone tell me if this is a known issue in firefox? and is firefox planning to fix it? Right now, is there any workaround or fix for this?

    Hi FredMcD,
    Thanks for the reply. Unfortunately, i don't see any crash reports in about:crashes. I am trying to reproduce the issue which will make browser to crash but somehow its not happening anymore but the browser gets stuck at a point. Here is what i am doing:
    - 3 tabs are open with same page of my application. The page has several panels which has charts and the javascript libraries used for this page are backbone.js, underscore.js, require.js, highcharts.js
    - The page automatically reloads after every 30 seconds
    - After the first loading of there three tabs, the memory consumption is 600MB. But after 5 minutes, the memory consumption goes to 1.6GB and stays at this rate.
    - After sometime, the page wont load completely for any of the tabs. At this stage the browser becomes very slow and i have to either hard refresh the tabs or restart the browser.

  • Slow Snow Leopard - esp. Parallels or VMWare - 140-500gb VM Page File Size!

    I know that the VM page file size is only the hypothetical maximum VM size that could be used, but immediately after startup on my recently installed (not upgraded) Snow Leopard my VM Size is 140gb. It is not running anything at that point, other than Vuze which starts up at login.
    Before restart, when I was trying to install Windows XP under VMWare, it was over 500gb!
    My MBP 2.4 unibody has been feeling sluggish generally with plenty of beachballs, grinding to a halt under VMWare or Parallels in particular, and I wonder if the VM Size is an indicator of some problem? Examples of Parallels and VMWare problems were that it would take hours to install Windows XP or Windows 7, and eventually just ground to a halt with the install almost finished.
    I have used Disk Utility to check the disk and repair permissions, but maybe bigger guns are needed? I took a quick look at my Xbench results, and the hard drive results were about 40% of the baseline... I have a feeling the hard drive might be churning away on something, slowing everything else down.
    For example, surely it shouldn't take a few seconds to actually show all the applications in the applications folder when you open the folder (when no other programs are running)...
    B
    Message was edited by: Bingggo

    Sorry, 2gb RAM. When I restarted, the VM Page File Size was 140gb, the free memory was over 1gb, and there were no page in/outs from memory.

Maybe you are looking for