0

I'm running a pressflow site with over 40,000 unique visitors a day, and almost 80,000 records in node_revision, and my site hangs randomly giving 'site offline' message. I have moved my db to innodb and it still continues. I'm using my-huge.cnf as my mysql config. Please advice me on a better configuration and reasons for all this. I'm running on a dedicated server with more than 300GB and 4GB RAM.

  • 1
    with only this information it is (almost) impossible to give a correct answer – Alfred Feb 27 '11 at 07:12
  • 1
    We need much more information to know how to answer this. Also the default mysql config files, are no longer suitable for production use - even the most "huge" one is still tiny by modern standards. – MarkR Feb 27 '11 at 07:58

2 Answers2

1

I suspect that you are having excessive connections to the database server which can exhaust your server RAM. This is very likely to be the case if you are running Apache in pre-fork mode and PHP as Apache module with persistent connections, and using the same server to serve images, CSS, JavaScript and other static content.

If that is the case, the way to go is to move the static content to a separate multi-threaded Web server like lighttpd or ngynx. That will avoid Apache forking too many processes that end up making PHP establish too many persistent connections that exhaust your RAM.

Flexo
  • 87,323
  • 22
  • 191
  • 272
mlemos
  • 1,235
  • 13
  • 21
1

The my-huge.cnf file was tuned for a "huge" server by standards of a decade ago, but it barely qualifies as a reasonable production configuration now. I would check other topics related to MySQL tuning and especially consider using a tool like Varnish to (since you're already on Pressflow) to cache anonymous traffic.