Will increasing my RAM reduce the size of my w3wp.exe in memory

324 views Asked by At

I have a asp.net web site. I have an image being updated via a timer as many times as possible every second with an image the size of 720x576. I control when the image can be updated by initiating the next ashx page call to get my image after the img control has finished loading the previous image (I do this on the 'onload' event).

My w3wp.exe currently stands at 140,000k and it drops to 130,000. Frequently going up and down between these 2 values.

As i am testing with 1 User and as I am on a cheap VPS shared hosting environment my question is when I go Live will the w3wp.exe become uncontrollable or will the fact that by upgrading my server package (mainly increasing RAM) help to keep this all under control n a multi-user environment?

This is my Javascript:

        var timer3;
        var intervalLive = 50;

        function play2() {
            if (timer3) window.clearTimeout(timer3);
            swapImages3();
        }

        function setImageSrc3(src) {
            _imgLive.src = src;
            timer3 = window.setTimeout(swapImages3, intervalLive);
        }

        function swapImages3() {
            var imgCached = new Image();
            imgCached.onload = function () {
                setImageSrc3(imgCached.src);
            };
            imgCached.onerror = function () {
                setImageSrc3("http://a URL/images/ERROR.jpg");
            };
            imgCached.onload = function () {
                setImageSrc3(imgCached.src);
            };
            imgCached.src = null;
            imgCached.src = 'http://A URL/Cloud/LiveXP.ashx?id=' + new Date().getTime() + '&Alias=' + alias;
        }

And this is in my ashx page:

public class Live : IHttpHandler {
    DAL dal = new DAL();
    static byte[] StandardError = Shared.ERROR;
    public void ProcessRequest(HttpContext context)
    {
        byte[] data = null;
        context.Response.ContentType = "image/jpg";
        try
        {
            if (context.Request.QueryString["Alias"] != null)
            {
                data = Shared.GetFrame(context.Request.QueryString["Alias"].ToString());
                context.Response.BinaryWrite(data);
            }
        }
        catch (Exception ex)
        {
            data = StandardError;
            dal.AddError(ex.ToString());
        }
        finally
        {
            context.Response.BinaryWrite(data);
        }
    }
    public bool IsReusable {
        get {
            return true;
        }
    }   
}

thanks

0

There are 0 answers