Mysql or Apache worker tuning
Hi guys! I have a question to address a couple of issues I'm having on an SMF install. Hope that's OK here.
A fairly large site 1.1M posts, returns a 500 error when trying to access the stats page or search. Otherwise the site is smoking fast.
The install is on a dual core VPS with 2G memory, apache worker, and sphinx search. I suspect the issue lies with either apache or mysql tuning. Anyone have pointers? Where should I start? Thanks!
Re: Mysql or Apache worker tuning
Reply #1 –
I hope with "search" you mean not access the ?action=search page, but rather when waiting for the search results, right?
Re: Mysql or Apache worker tuning
Reply #3 –
Did you check the error log? I don't know anything about Sphinx, but I'm sure it also has an error log.
Re: Mysql or Apache worker tuning
Reply #4 –
The Statistic Page is not accessing Sphinx as far as i can see. I would check the Apache (Error) Log files
Re: Mysql or Apache worker tuning
Reply #5 –
Thanks guys. The apache error logs are clear. I can't help but think both symptoms hold a common root cause. If so, sphinx is an unlikely culprit. Could the apache memory limits be too low?
Re: Mysql or Apache worker tuning
Reply #6 –
What are the memory limits you have it set to?
Re: Mysql or Apache worker tuning
Reply #7 –
Your error log might not be setup correctly or you might be looking at the wrong one. When you hit an Apache/PHP memory limit it gets logged. Please post your httpd.conf and php.ini. MySQL shouldn't have anything to do with it but it's always a good idea to check that error log to make sure nothing bad is happening. It's a good idea to check all of your error logs, really.
Re: Mysql or Apache worker tuning
Reply #9 –
Seems like a 500 is going to be some PHP error
Look at phpinfo to see where its log is located and see if it has anything in it. If its empty, you may need to set/add error_reporting = E_ALL in your php.ini (just add it at the end). Then create the 500 error again and check the log (and be sure and remove the above line).
It could also be sphinx, if you are running a version that is not compatible with the config file. I think the smf one requires the separate api file, you have to get that from the sphinx distro.
Re: Mysql or Apache worker tuning
Reply #10 –
Now I'm getting a warning in the error log:
PHP Warning: set_error_handler() expects the argument (error_handler) to be a valid callback in /public_html/index.php on line 110
Not sure that would cause death and destruction upon a search, or in the stats.