Search squid archive

Re: custom url_rewrite_program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Re:  custom url_rewrite_program

Amos Jeffries
Mon, 01 Mar 2010 14:36:02 -0800

On Mon, 1 Mar 2010 14:26:21 -0600 (CST), Al - Image Hosting Services
<az...@xxxxxxxxxxxxxxxxxxxx> wrote:

> Hi,
>
> I could not get a rewriter that would do the things we wanted, so we > wrote our own. It uses mysql as the database for its list, which is > great because I can now update mysql and instantly you can see the > change in what is being blocked and what is not. The issue we have is > that if the mysql server goes down then the rewrite program tries to > reconnect, but if it can't it dies. Ideally, if it could not connect > to mysql then it would send a url of an error page, then try to > reconnect on the next request. My question is, how long will squid > wait for the rewrite program before it will kill the process and start > a new one?
>
> Maybe someone has a better idea on how to deal with this.
>
> Best Regards,
> Al

Squid will wait until the next shutdown or the client goes away.

My helpers that do this try 2 connection attempts with 1 second sleep
between, so as not to cause too much client annoyance. That may differ with the impatience of your clients.

Amos


We rewrote our helpers (both the url_rewrite_program and the auth program) so that now they will try to reconnect if they lose contact with the mysql server. Of course, authenication fails or an error page is displayed without mysql and as soon as mysql is restarted then everything works just like nothing ever happened. I wanted to thank everyone who helped me with this and I have one last question: Will squid go down if there is a lot of requests and the helpers are very slow to respond?

Thanks,
Al

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux