Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 18th, 2002, 01:23 PM
Joruus Joruus is offline
PHP Wizard In Training
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Ohio, US
Posts: 15 Joruus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question checking for memory leaks in PHP scripts

I'm posting this in the Linux forum because that is the OS I am needing help in tracking down a memory leak.

Basically I'm wondering if anyone out there has any experience in trying to track down memory leaks under Linux.

I have an application I am working on which runs as a script that runs 24x7 in the background on my Linux server gathering data from our AS400 and putting it into a local MySQL database. This is accomplished with a Java script that is called from a PHP "wrapper" script. The problem lies in that when this script is just left to run, even though it functions properly, system memory usage steadily climbs up at the rate of 7-10 megabytes per hour. I have 2 gigs of memory and 2 gigs of swap space on this server but I came in this morning to an unresponsive server and I think my script is the culprit.

I am at a total loss though as to how to begin troubleshooting this. Best I can figure is that when my PHP script calls the java script there is some data that isn't properly cleaned up.

Anyone have any advice or pointers on how to troubleshoot this type of problem?

Reply With Quote
  #2  
Old November 22nd, 2002, 04:13 AM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,296 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 5 m 42 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
the GNU Debugger, gdb is often tool of choice for this sort of stuff. I haven't really done much of a search, but this link gives some pointers for sniffing out memleaks in kde. I think google is your friend on this one

http://developer.kde.org/documentat...emoryleaks.html

have fun, and post back with what you find. I'm sort of interested in this stuff too !

christo

I just noticed that page also links to
Valgrind, ccmalloc and memprof, which might also be handy

Last edited by christo : November 22nd, 2002 at 04:40 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > checking for memory leaks in PHP scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway