Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Multiple httpd, single mysql


Go to End


5 Posts   1305 Views

Avatar
valtus2

Community Member, 2 Posts

14 December 2010 at 7:13am

We've been running silverstripe with 4 web servers, each with their own set of files and a single database. We keep the files in sync using svn. It doesn't work well because files get out of sync and it seems like SS is caching something, making it harder to figure out which server contains what.

What is the right way to set this up? I'm thinking of mounting the install dir on a drive which all four servers can access, but we're worried about problems caused if two web servers try to modify files at the same time.

Avatar
Willr

Forum Moderator, 5523 Posts

14 December 2010 at 6:06pm

One thing to watch out for with multiple httpd servers is how you deal with user uploaded files. These cannot be uploaded to a single box since the others would miss out. In that case you need to setup a share or something similar.

it seems like SS is caching something

SilverStripe keeps a cache of all the templates and class files for speed. Ideally for this sort of deployment environment you would have a script that rm -rfed the cache folder after updating the code on each to ensure no old data is retained.

Avatar
valtus2

Community Member, 2 Posts

15 December 2010 at 6:31am

Thanks. I am planning on using a shared drive for the user uploaded files.

I found this doc about the cache. http://doc.silverstripe.org/contentdeliverynetworkissues

Is it better to move the cache onto the shared drive or to remove from the local drive it after updating the code?

And the cache wouldn't have to be removed after changes made through the cms, correct?

-john

Avatar
Willr

Forum Moderator, 5523 Posts

15 December 2010 at 9:40am

And the cache wouldn't have to be removed after changes made through the cms, correct?

Depends on what you changed, sometimes you will need to update the cache. For example, if you have a Menu include and they change the menu items then that will require a cache update.

Is it better to move the cache onto the shared drive or to remove from the local drive it after updating the code?

I personally keep it on the local drive and remove it than store it on the shared one just in terms of speed and scaling.

Avatar
valtus

Community Member, 2 Posts

18 December 2010 at 10:13am

Willr, Thanks for your help.
I have the site set up now by doing a symbolic link for the web root to a shared drive. It's mostly working, but there are a couple of issues.
1) the /admin link is found on the server I used to install silverstripe, but not on the server that just shares the drive.

I think it has something to do with the contents of the .htaccess file in the webroot, but I'm not sure what to change.

2) Some images don't show up, although they work when open them on their own. I''ved tried doing a /?flush=all and removing the cache. But I get the same behavior.