Configuring PHP

#1
Do my configurations look correct? I've been having a couple large lag spikes coupled with timeouts/500 errors. I have a 2 core, 24 thread server with 32 gigs of ram, there shouldn't be any problems with system resources as I host 3-4 sites off the server, 1 large one and several small ones.





I am also getting "[STDERR] die 4 true" all over my error logs, is there a reason for this?
 
Last edited:

eva2000

Well-Known Member
#2
Off duty so not at work (vB) :)

Just a few quick comments before other folks chime in.

1. Connection and Keep Alive time outs too low. If you're getting gateway timeout 50x errors, it could be a combination of both MySQL backend lag (table locking, slow queries) + too short timeout values - basically MySQL backend can't pass the data back to litespeed/php in time and throws 50x gateway timeout errors. I experienced this ages ago on a dual haproxy load balanced 2x litespeed web server and the problem was further up though in that haproxy timeouts were too short resulting in 50x gateway timeout errors as MySQL backend dying under the load of poorly coded drupal code. Raising time outs fixed the problem of gateway timeouts but still slowness existed.

2. Try lowering LSAPI PHP App's max connections and max children

3. Check your error logs for indicators if you have hit your soft/hard process limits etc

Of course if it's still MySQL related, then you really need to hire someone to delve deeper into the MySQL side especially if you have other hacks, plugin code installed. It's pretty common to have some rogue plugin/hack code which non-optimally hits the thread, post, user or session tables driving up loads and extending lag time. Common one is if you have alot of member/users registered = large user table and have hacks which pull alot of rows from that user table = MySQL backend getting hammered. When the clients remove the plugin/hack = instant load drop to normal levels!

Also check your stderr.log i.e. on WHM/Litespeed servers it will be at /usr/local/apache/logs/stderr.log
 
Last edited:
Top