Mike,

For an experiment, I removed the while(1)...loop, and it didn't have any
impact on squidGuard performance.

What I am doing is having squidGuard interface to a MySQL database to
get certain parameters about any given user coming through.  To do this,
I have to establish the MySQL connection before the 'while(1)' and
nested 'while(fgets(buf, MAX_BUF, stdin) != NULL){' loops, and maintain
a persistent connection to MySQL.  Actually I have as many persistent
connections to MySQL, as I have 'redirect_children' defined in squid.

My problem is that I am having memory leaks by holding these persistent
connections, and I don't know yet what is causing the leaks.  MySQL
supports persistent connections, so it must be some interaction (or
non-interaction) between squidGuard and MySQL causing the leaks.  This
is just my theory right now, but I need to learn how to analyze a core
dump to really understand what is happening.

Anyway, thanks for the response, and yeah, I don't see much traffic on
this list either.

Murrah Boswell

Mike Atkinson wrote:
> 
> Murrah,
> 
> Squid expects the task to continue running as it allocates the stdin/stdout
> handles for the process.  The redirector should only exit when the stdin
> handle closes.
> 
> For some reason there is pretty much nobody on this list.  I've been trying
> to get a question answered for a few weeks and have never seen any other
> traffic.
> 
> Cheers!
> Mike
> 
> ----- Original Message -----
> From: "WA Support" <[EMAIL PROTECTED]>
> To: "SquidGuard" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 28, 2003 2:49 PM
> Subject: persistent connection question
> 
> > Hello,
> >
> > Does anyone know why squidGuard has to maintain a persistent connection
> > listening to squid?
> >
> > Is it possible to kill remove the while(1)... loop in main.c and have
> > squid fireup squidGuard each time it needs to access the redirect
> > program?  Or does squid expect a persistent from it's redirect program?
> >
> > Thanks,
> > Murrah Boswell

Reply via email to