Welcome to WebmasterWorld Guest from 35.170.81.210

Forum Moderators: bakedjake

Message Too Old, No Replies

Memory leak help?

My server (not my brain) has a memory leak somewhere ...

     
12:32 pm on Sep 30, 2005 (gmt 0)

New User

10+ Year Member

joined:Sept 21, 2005
posts:30
votes: 0


My new server seems to have a memory leak somewhere I was wondering if you knew of a way to track it down. I get about two days before all available memory is used up. For the time being I have a restart script cron'd for 3:30 am every morning, but I would rather not run it like that.

Any suggestions?

1:27 pm on Oct 1, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:July 20, 2002
posts:118
votes: 0


log in via ssh and use:

top

then, use your caps lock key to get into capitals and press your M key to sort by memory usage. This will show you running processes by order of what's using the most memory and may help track the problem down.

To quit top, press your caps lock key again and press your q key.

You may want to do this at intervals of a few hours and copy the results down to see if something is gradually increasing its memory usage.

9:57 am on Oct 4, 2005 (gmt 0)

New User

10+ Year Member

joined:July 5, 2005
posts:6
votes: 0


This initially scares most beginner linux users.. generally it is not a memory leak at ALL. Linux uses memory very effectively. When a process goes idle it will go into a sleeping state and will allocate memory to processes in the running state. This however will not lower the total memory used as shown in a top report. When you run your 'top' command, be sure to check the Task line.. this will tell you the number of processes total, runnning, sleeping, stopped and zombied. The key number on that line is sleeping. Linux will use all the memory that you can throw at it. When it uses it is up to it.

424Boyz

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members