WebFaction
Community site: login faq

Hi,

I have two fairly popular sites running on Drupal 6, multisite installation with separate mySQL DBs for each site. Both sites are pure forums, with virtually no static content aside from a few buttons and avatars and CSS files. I don't even host images or videos for the forums with the exception of a small number of post attachments, it's almost all offsite. The frontpage of both sites use Drupal Views to generate recent posts. At any given moment, I usually have a total of 100 users browsing or posting, usually more than half of them are registered. Between the two sites I usually get about 300K hits/day, and gradually going up.

I am interested in using some sort of an advanced caching method, because I'm hitting the max connections limit on mySQL. but I'm not sure about my options and what would be good for a site like mine. The main factor is that a high percentage of my traffic comes from registered users, so Boost won't help as much as on other sites.

I've been looking at http://drupal.org/project/authcache , which is advertised as extremely effective caching for authenticated user pages. But I tried a demo and I don't like how some things like "Posted 12 minutes ago" don't update. And besides, it appears that as soon as any comments or node updates are made, the entire authcache is wiped and it starts from 0 for all nodes. So I doubt it would do much for my site.

What are my other options? How can a site like a forum work well with caching? Memcache or APC would help me at all for caching pages for authenticated users? Anything else I'm missing?

Thanks in advance.

asked 22 Dec '11, 22:28

sb56637
13813
accept rate: 0%


Hi,

The 'max_user_connections' limit is a limit on the maximum number of simultaneous connections allowed for a particular database. This is set to 30 to prevent abuses where one website consumes all of the database resources and affects performance of other websites on the machine:

$ cat /etc/my.cnf | grep max_user_connections max_user_connections=30

This 30 simultaneous connection limit only applies to the shared MySQL instance, but you can still use any number of connections if you install a private copy of MySQL into your home directory. This works because our webservers use 'cgroups' in order to fairly distribute load among users on the machine:

http://blog.webfaction.com/2011/11/fair-shared-hosting/

Therefore, if you run a private copy of MySQL, it will exist outside of the same cgroup space as the server-wide shared mysql, and allow you to set any number of connections since you have full (root) access into the database server. Running a local MySQL does consume RAM, but we have recently upgraded all accounts to 256MB of memory, so this should not pose a problem.

Step-by-step instructions on installing MySQL can be found on our community forum, here: http://community.webfaction.com/questions/3838/compiling-a-private-mysql-installation-in-your-home-directory

The installation itself is performed via an SSH session on the server, and information on accessing SSH is available in our documentation here: http://docs.webfaction.com/user-guide/access.html#connecting-with-ssh

That said, this is more of a workaround rather than the actual solution to the problem of caching. Any kind of caching, no matter how good it is will have the downside of expiring items as soon as the site is updated this is significantly harder in case of authenticated users.

Authcache seems to be the best solution in that case, other than that you can use:
https://www.varnish-cache.org/trac/wiki/VarnishAndDrupal
along with
http://drupal.org/project/esi

permanent link

answered 22 Dec '11, 23:10

neeravk
1.5k3412
accept rate: 41%

edited 22 Dec '11, 23:12

Thanks for the reply. And any comments about memcache and/or APC for authenticated users?

Are you guys running any sort of caching here on this community section?

(22 Dec '11, 23:17) sb56637

Thanks for the reply. And any comments about memcache and/or APC for authenticated users?

The best way to accomplish this seems to be PressFlow or BOA as seen here: http://groups.drupal.org/node/180234

Are you guys running any sort of caching here on this community section?

We don't use any caching for this community site.

(22 Dec '11, 23:42) neeravk
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×63
×34
×9
×8
×1

question asked: 22 Dec '11, 22:28

question was seen: 4,131 times

last updated: 22 Dec '11, 23:42

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM