Opened 3 years ago

Closed 22 months ago

#264 closed defect (fixed)

xcache fails with hardlinked sources and gallery2

Reported by: Der_Judge Owned by: moo
Priority: major Milestone: 2.0.1
Component: cacher Version: 1.3.1
Keywords: gallery2 Cc:
Application: PHP Version: 5.3.8
Other Exts: SAPI: Irrelevant
Probability: Always Blocked By:
Blocking:

Description (last modified by moo)

Hi there,

I'm running several servers with Gentoo Linux. Gentoo Linux uses a concept of hardlinking sources of php apps to achieve multiple goals:

  • It saves a lot of diskspace / inodes
  • You can update all instances of this software at the same time
  • The caching of sources with eaccelerator or xcache is more effective, since all identical scripts have to be cache only once
  • Backups are done faster

...

In short: There are many pluses by using this concept, which is why many other people are using this concept besides from Gentoo, too.

On the xcache website is a list of tested applications, including Gallery2.
I'm using Gallery2 with xcache and hardlinked sources on my server and I'm encountering the same issue with xcache now which I encountered using eaccelerator:

When xcache is active, on _every_ site that content of the gallery is shown, which first hit the cache.
For example:
You are running a gallery2 at http://www.example.org/gallery2 , another one at http://www.example.org/gallery2-new and a third one at http://www.example2.org/gallery2 on the same server and xcache is active. Now someone accesses http://www.example.org/gallery2 and afterwards the other ones. This will result in that way, that everyone who visits _any_ of these galleries will see the content of http://www.example.org/gallery2 .

I can provide a root login and a demo if necessary, but I'd like to not post it here. I'm loged in to freenode everyday and my registered username is "Judge" there. A second option to get in contact is to instant message me with AIM - my Screenname is mfcjudge . I Also use Jabber : thejudge@… .
Finally, you can write me a email at mailYYYY@… (replace YYYY by current year).

Change History (2)

comment:1 Changed 3 years ago by moo

  • Description modified (diff)

i think it is issued by __FILE __DIR. these constants is expanded to real value at compile time, and as you expected they're stored in cache as 1 copy because files are hard linked (same inode)

can you please try trunk version of xcache? there's a workaround for __FILE and __DIR

otherwise, try un-hardlink and use xcache trunk (2.x), xcache 2 is smart enough to cache 1 copy for multiple same (in content) php files

comment:2 Changed 22 months ago by moo

  • Milestone set to 2.0.1
  • Resolution set to fixed
  • Status changed from new to closed

fixed in [964] (scheduled for 2.0.1). set "xcache.experimental = on" to eanble this fix for now

Note: See TracTickets for help on using tickets.