Forum Moderators: open
While I'm doing the above I got the feeling that Windows resources seep down much faster than that would happen if I have had doing some other regular thing. For number of times a day my WinXP delivers a Low Memory message and soon after it I have to reboot, otherwise the pc almoust falls asleep.
I'm not any kind of professional in this work. Therefore simple things scare me.
Could it be that my website occupies an incresing amount of memory every time I open a new page of it, due to preloaded images that are preloaded by the "main-frame" page template each time any new page is opened? Or could be there any kind of memory leak at php level due to re-creating objects and variables every time the dynamic page loads? Is there any recommended technique of disposing those objects when shifting the page so that they could be created when needed and disposed at exit of page?
Thanks in advance,
Nick
Are you sure you are not loading new instants of a dll over and over? Have you used task manager to look at the loaded processes?
Yesteryear there was an article in Microsoft System Journal call ‘Programmers, clean up after thyselves”. Are you sure that threads are not getting launched and never ended?
But, yea it could be a memory leak I have a newsbot that develops a memory leak because of their dlls.
For number of times a day my WinXP delivers a Low Memory message and soon after it I have to reboot, otherwise the pc almoust falls asleep.
How much RAM? With each new implemenation of Windows, they become more and more consumptive of resources.
I just bought an IBM 2.8 gHz, WXP, and figured 256MB of RAM would be MORE than enough.* I would get the same thing, it was fine, really, until I had several programs open. What happens is it begins to do it's "memory" work on disk, there are hangs and lags . . . .
I put a second 256 chip in it and now it's the fastest machine I've ever owned, all my problems went away.
*Does anyone remember Bill Gates saying, "256K RAM should be enough for ANYONE!"
Assuming that is not the problem, it sounds like a leak in the graphics code of an app. Close everything down one app at a time and you'll probably find it. Start with new or recently updated software.
Also, spyware/virus is a possibility.
Kaled.
This is laptop and RAM is 256. Indeed I'm getting around better on my desktop where RAM is 256+128, much better I would say. Although I don't work with my website there, so what I'm getting around in this instance are the regular disturbances... "Regular" problems are harder at my laptop, but those I recognize.
Sure, checking Task manager all the time and don't see any duplicate threads unless SVCHOST.EXE loaded for jillion times. Number of IE-s in memory accurately correspond to open browser windows - no hijecking or that sort of things so far.
What I'm concerned with, actually, is whether my website - in which I'm digging in all the time continiously optimizing it and phishing "bugs" and mistakes (those I'm producing repeatedly while this job) - this website could stuck the memory up while being serfed by me 3-5 hours each session? The pages are dynamic and are "wrapped" into the same template page, which on its turn has some objects and graphics as preloaded on open - does it mean that this template preloads all the stuff every time I open any new page or the same page all over again? Could that overload the memory after some long period of "persistent torchure" of the pc? Also I heard about such a thing as PHP memory leak - could this be that?
Chiniese say something like: "If stay long enough at the river side You might see the body of your enemy drifting by". If trying hard and long you could overload the memory even leaking smallest portions each time. That's what I mean. And certainly there should be recommended PHP programming techniques that provide with memory caring programming manner - killing threads or freeing graphics from memory on exit of every dynamic page and things like this... Whould be happy to learn about such things.
Thanks,
Nick
But what I did notice was the sluggish performance that sometimes developed during the course of a day.
.... - does it mean that this template preloads all the stuff every time I open any new page or the same page all over again? Could that overload the memory after some long period of "persistent torchure" of the pc? Also I heard about such a thing as PHP memory leak - could this be that?
No, and no.
Whatever complexities are going on on your site has nothing to do with how you receive it. It outputs a data stream that is basically plain text (no matter if it's created in perl, php, asp, or a static html page) and shoots it to the browser. The browser stores it in the cache and collects the linked images and objects, done. What you receive on your computer is still a plain text page, no matter what.
A memory leak is something that affects the environment it's run on. If you have a "php memory leak" it's going to affect the server, not your local comp.
Stop what you're doing right now, drive to your nearest Staples and buy a 256 333mhz DDR chip, it will cost you under $100 (I managed to pick a DDR chip for $49, with $20 rebate it was $29!) Shortly thereafter you will jump for joy like all those Toyota, Qwest, and Viagra commercials. :-)
XP is a bit of a RAM hog, esp. on a laptop.
[msdn.microsoft.com...]
Malware it the most likely cause followed by a bug in IE. If there is something unusual about your page such as using javascript to preload images, it is possible you have exposed a bug in IE that has not been noticed before.
Before you splash out money and risk trashing your computer by installing memory (I'm guessing you don't have hardware experience) do the simple things. In this case that means test using other browsers. You should always do this anyway.
Test with Firefox for a day and then Opera for a day. My guess is that it'll be ok. However, these tests may show up faults in your code.
Also make sure your code validates. Invalid code may possibly lead to memory leaks.
[validator.w3.org...]
Kaled.