Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Tue Jun 02, 2009 3:37 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Karnius wrote:
okay ..

My server was more stable this morning, but still crashed just now..

This is only one site, with like 5000 visit a day, I do not understand how this is crashing a dedicated.

I augmented the swap, my-medium,cfn is up and running, my last option is returning to managed hosting I think.....


We can't really help you unless you give us more information. Post snapshots from ps and/or top right before the system crashes, for example.


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 4:45 pm 
Offline
Junior Member

Joined: Thu Dec 18, 2008 12:33 pm
Posts: 27
hey,

Okay, I'm gonna post them tomorrow.
Thank you for all your help by the way.

For now I followed some advice from you guys:

Disabled innodb in my.cnf
Changed de maxclient at 35 in httpd.conf
Disabled spam filter in ispconfig
deleted red5 flash server communication
Put my swap to 450 meg

Looking into :
* postfix antivirus, i'm not sure where to disable this
* MinSpareServers, MaxSpareServers in httpd.conf were already at 1 ???
* wordpress mysql leaking ??

I run on a 540 meg today, and it seem stable since the last crash but I did not have huge spike like yesterday.


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 5:33 pm 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hi,

I don't know what kind of configurations you are using, but I run a forum in a 360 linode with 2/3 or you traffic without any problems:

Here you can see my MySQL configuration:
http://www.vbulletin.com/forum/showthre ... ost1696100

Here you can see my nginx + apache/mod_php setup to deal with static + dynamic requests:
http://www.vbulletin.com/forum/showthre ... ost1734871

With nginx + apache you have both of two worlds and you just proxy to apache php requests. Everything else (static) is managed by nginx.
You should install (if you haven't done yet) an opcode like APC or xCache.
I'm running APC. It helps a lot.

With this setup you can slow down apache to something like this:

Code:
StartServers 2
MinSpareServers 2
MaxSpareServers 2
MaxClients 10
MaxRequestsPerChild 1000


This is a very fast and stable setup.

Image

Image

Note: This setup works for me and I don't know if will works for you.


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 1:39 pm 
Offline
Junior Member

Joined: Thu Dec 18, 2008 12:33 pm
Posts: 27
Little Update,

I optimized my php.ini, mysql, and deactivates unnecessary appache modules following these instruction: http://elliottback.com/wp/why-my-wordpr ... han-yours/

And benchmarked with Apache bench, could not get trough ab -c 100 -n 100

I also installed eAccelerator following these instructions: http://developer.mindtouch.com/Deki/FAQ ... 04_(Debian)

And now I can get trough ab -c 100 -n 100 easily.

Gonna test more tonight, too much traffic right now. But it seem to have resolve my problem, wanted to put some links for newbies like me out there...

I certainly learned a bunch about configurations in 2 days lol...

I would certainly like to have both apache and ngnix, anyone have a tutorial to get them working simultaniously


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 2:42 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Using both at the same time will only waste memory...


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 3:51 pm 
Offline
Senior Member

Joined: Thu Apr 03, 2008 12:02 am
Posts: 103
AOL: derole
Actually, some people like the nginx+apache setup.
They use nginx for all the static content and reverse proxy php pages to apache+mod_php installation.
apache+mod_php is more stable than fcgi, you don't necessarily need to modify your existing config and i think mod_php offers some features that fcgi doesn't (need to dbl-check that).
Might make sense if your site is heavy on static content and you already have a working configuration that you want to migrate without much hassle.


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 4:43 pm 
Offline
Senior Newbie

Joined: Sun May 31, 2009 12:16 pm
Posts: 12
I am still in the process of installing and configuring things (and learning a lot) on my Slackware 12.2 linode. With nothing but my ssh connection, I am surprise that I still have 300+ mb of free memory on a 360 linode (free -m). I run a Nginx server, three fastcgi php 5.3, mysqld (medium my.cnf), vsftpd, a Git daemon and few other stuff. Everything was compiled from source, I tried to tweak the configure scripts for each program. I have no idea how things will be in a few weeks when everything is in production.


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 6:33 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
oliver wrote:
Actually, some people like the nginx+apache setup.
They use nginx for all the static content and reverse proxy php pages to apache+mod_php installation.
apache+mod_php is more stable than fcgi, you don't necessarily need to modify your existing config and i think mod_php offers some features that fcgi doesn't (need to dbl-check that).
Might make sense if your site is heavy on static content and you already have a working configuration that you want to migrate without much hassle.


Apache + nginx/lighttpd/lightspeed can be more efficient memory-wise when compared to Apache, but nginx/lighttpd/lightspeed alone would always be more memory efficient than both at the same time.

I'm not aware of any stability issues with fastcgi-based dynamic content, and lighttpd is more memory efficient than apache+mod_php. With apache+mod_php, every single Apache process gets PHP built-in whether it needs it or not. With lighttpd+fastcgi, your main lighttpd process remains PHP-free, handling static content, while you have a configurable number of dedicated PHP processes that you can tailor to suit your load requirements without impacting the memory footprint of static content.

For example, our setup has both PHP and Perl loaded via fastcgi into lighttpd, but our Perl load is way lighter than our PHP load. As such, we've got 6 PHP processes and 2 Perl processes. I believe if you had both PHP and Perl loaded in Apache, you'd have BOTH PHP and Perl in *every* single Apache process even if they were serving static content!


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 6:56 pm 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Karnius wrote:
I would certainly like to have both apache and ngnix, anyone have a tutorial to get them working simultaniously


In my post above, you can see my setup. You have links with explanations.


Top
   
 Post subject:
PostPosted: Wed Jun 03, 2009 6:59 pm 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Guspaz wrote:
Using both at the same time will only waste memory...


That's the opposite, because you only need a few apache servers to handle dynamic requests.
All others requests are handles by nginx.

With Apache you have an 25 MB average process to deal with dynamic and static content.
With this setup you have a 3MB process to handle static content.
Since apache only need to handle on request per access you will have a very stable setup.

In my tests, php as fastcgi (with apache or nginx) is slower and you will have problems if you put some load into it.
You can see similar tests here: http://2bits.com/articles/apache-fcgid- ... ation.html

Besides, I like apache configurations and modules, that using this setup I will no loose :)


Top
   
 Post subject:
PostPosted: Thu Jun 04, 2009 7:23 am 
Offline
Junior Member

Joined: Tue Jan 01, 2008 4:28 am
Posts: 32
Moreover, with lighttpd/nginx + PHP fastcgi your FCGI slave processes are always fixed (when you run the spawn-fcgi or whatever to bootstrap them). Whereas with a Apache backend, the number of Apache processes can be dynamic.

That means if you suddenly needs more processes than you have started with, lighttpd/nginx + PHP fastcgi will have to queue, whereas Apache can serve straight away.

Not big deal though if you have planned properly.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group