Like Ra's Naughty Forum

Full Version: Site performance, Server errors, outages and tunings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OK, it's not that easy.

o- mod_fcgi is not good for opcode cache
o- mdm-itk is aware of user permissions but is not threaded
o- suexec is not compatible with opcode cache
o- mdm-worker + mod_fcgid show "Forbidden. You don't have permission to access /forum/mybb/index.php on this server."
o- mod-fastcgi does work with opcode cache, but is not a part of Ubuntu distribution anymore (will need to compile it).

I see no chances to use mpm-worker so far.

Back to preforked, cgid and mod_php. Next step is moving to fastcgi (mod_fastcgi or mod_fcgi).
Confused suphp with suexec. Suexec is compatible with opcode caching, suphp is not. Also, found mod_fastcgi in the Ubuntu repository.

So, this is the only way I see at the moment:

mdm_worker, suexec, mod_fastcgi. Separate threaded apache, separate PHP processes with shared APC memory under different UIDs.

But the question is - will it work any faster and wouldn't it take even more memory?
May be this http://www.ibm.com/developerworks/linux/...index.html helps ...

I just did a short google search.

krinlyc

p.S. this lokks cool too http://phplens.com/phpeverywhere/tuning-apache-php
(19 Dec 2011, 18:17 )krinlyc Wrote: [ -> ]this lokks cool too
Tool old: Fri, 18/06/2004 - 5:07pm

(19 Dec 2011, 18:17 )krinlyc Wrote: [ -> ]May be this

Too general and also a bit too old. They recommend eAccelerator and APC is only mentioned that it exists.

My current problem is configuration of the modules. I think no other combination is possible at the moment:

(18 Dec 2011, 20:57 )Like Ra Wrote: [ -> ]mdm_worker, suexec, mod_fastcgi. Separate threaded apache, separate PHP processes with shared APC memory under different UIDs.
o- fixed the duplicate page bar at the top (blog)
o- changed the counter (less scripts, smaller code, less redirects)
o- updated WordPress
Strange error. The web-server does not want to restart automatically when the server is overloaded. Probably, if the load is too high it can not shut down properly. Probably I need to stop it, wait a bit, kill -9 what's left, wait, then start again.
This is what happens:

service apache2 restart

* Restarting web server apache2
... waiting ..(98)Address aeady in use: make_sock: could not bind to address [::]:80
(98)Address aeady in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
...fail!

And the logs are:

[Sat Jan 07 15:47:34 2012] [warn] child process 25535 still did not exit, sending a SIGTERM
. . .
[Sat Jan 07 15:47:36 2012] [error] child process 25535 still did not exit, sending a SIGKILL
. . .
[Sat Jan 07 15:47:37 2012] [error] could not make child process 25535 exit, attempting to continue anyway

If kill -9 does not work, then the process was locked by I/O operations.

Gonna add a checker/restarter to the monitoring script.
Forgot to add:

Why does not everything just work?

:-\
Changed the monitoring script. Let's see how it will work.
Yessss!!!! The script worked!!!!

The load jumped to 6.12 from nothing (the server was out of memory), my script restarted apache to reset the load and when apache refused to start, it was restarted on the next iteration:

HTTPD = 0 Restarting apache
* Restarting web server apache2
...done.

The total down time was about 5 min.