List for cgit developers and users
 help / color / mirror / Atom feed
* Problem with cgit cache
@ 2015-01-19 19:17 webmaster
  2015-01-19 19:50 ` john
  0 siblings, 1 reply; 2+ messages in thread
From: webmaster @ 2015-01-19 19:17 UTC (permalink / raw)


Greetings,

We use cgit for about 800 Git repos. Lately we've noticed that the links 
in the cache become polluted. We've noticed hits like this in the logs, 
which come from Search Bots, which seem to match the garbage in the 
cache links:

GET /c/set%7Cset%26set/org....

GET /c/%0aset%7cset%26set%0a/org....

(we serve cgit from /c/)

If I clear the cache entries, all is well until these bots come along 
and pollute it again.  If I set cache-size=0 everything works well, 
albeit much slower.

Is this a known bug in cgit?  For now I've added some Apache 
RewriteRules so that these hits don't reach cgit, but it would be nice 
if cgit could deal with these.

You can read more on our bug tracker, here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=453438

Thanks,

Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Problem with cgit cache
  2015-01-19 19:17 Problem with cgit cache webmaster
@ 2015-01-19 19:50 ` john
  0 siblings, 0 replies; 2+ messages in thread
From: john @ 2015-01-19 19:50 UTC (permalink / raw)


On Mon, Jan 19, 2015 at 02:17:00PM -0500, Eclipse Webmaster (Denis Roy) wrote:
> We use cgit for about 800 Git repos. Lately we've noticed that the links 
> in the cache become polluted. We've noticed hits like this in the logs, 
> which come from Search Bots, which seem to match the garbage in the 
> cache links:
> 
> GET /c/set%7Cset%26set/org....
> 
> GET /c/%0aset%7cset%26set%0a/org....
> 
> (we serve cgit from /c/)
> 
> If I clear the cache entries, all is well until these bots come along 
> and pollute it again.  If I set cache-size=0 everything works well, 
> albeit much slower.
> 
> Is this a known bug in cgit?  For now I've added some Apache 
> RewriteRules so that these hits don't reach cgit, but it would be nice 
> if cgit could deal with these.
> 
> You can read more on our bug tracker, here:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=453438

Although you seem to have ruled it out, I think storing the cache on NFS
is likely to be problematic.

A quick search found some documentation [1], [2] on problems with
sendfile(2) and NFS.  You could try editing cgit.mk to comment out the
HAVE_LINUX_SENDFILE define, but I would recommend avoiding NFS for the
cache if possible.

I have tried a quick test and wasn't able to reproduce your error, but I
will try to find some time to investigate further and see if there is a
problem with certain requests.

[1] http://www.proftpd.org/docs/howto/Sendfile.html
[2] http://httpd.apache.org/docs/2.2/misc/perf-tuning.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-19 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-19 19:17 Problem with cgit cache webmaster
2015-01-19 19:50 ` john

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).