Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Fix for memory leak patch

Quote Reply
Fix for memory leak patch
Excellent!

I've been trying to track down a problem with my Linux test PC when building a large directory of around 700K links. The machine slows down and almost grinds to a halt towards the end of the build - appears like a memory resource issue. So, I will try the latest patch soon and see how it goes !

Please note: I did notice in nph-build.cgi that filehandles aren't released after writing pages except for _build_home which closes the filehandle. This is a GLinks 3 issue only as I looked at nph-build.cgi from 2.1.x and the file handles were being closed after each page was built. This may be causing a memory leak as well.

Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.
Quote Reply
Re: [rocco] Fix for memory leak patch In reply to
Hi,

Yeah, this is an issue. We had it on one of our sites. Try emailing support@gossamer-threads.com, and they should be able to patch it up for you (not sure if there is a stable auto-installing patch available yet).

You're not alone =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Fix for memory leak patch In reply to
Yes, there was an auto-installing patch which I was going to try out.

Here are the results since then:

From my Linux test machine with 256MB and building 700K links in 30K categories:

- Before patch: climbed to 98% mem used
- After patch: climbed to 22% mem used
- After 10 "close $fh" statements added to nph-build.cgi: climbed to 22% mem used.

Looks like the extra file close statements I put in nph-build.cgi made no difference but it's probably good practice anyway.

Still looks like there's still some leaking going on with memory climbing slowly to 22% but not something that will kill your server like before.

Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.