Jump to content

Max Server CPU Usage


Recommended Posts

Hello

 

I'm developing a site on 1.6.1.6 (currently in maintenance mode) and it's using 99-100% of my server CPU all of the time. 

 

I've checked via SSH and it simply shows a PHP command coming from /bin/php -d open_basedir= -d error_reporting=E_ERROR -c /var/www/vhosts/system/***.co.uk/etc/

 

I've tried playing about with CCC settings to no avail, but read on the following thread that installing Xcache worked for somebody:

 

https://www.prestashop.com/forums/topic/490187-1613-high-cpu-load/

 

Is there something else I should look at first as it's not a problem I've had before with Prestashop? Could it be an error with a script on a permanent loop?

 

Server is CentOS 6.5 wiht PHP 5.3.

 

Thanks

Scott

Link to comment
Share on other sites

Thanks for the quick reply, El Patron.

 

I always get a bit worried when it comes to changing server components! I've installed PHP 5.6 but the front end now won't load. I get the following error:

 

Fatal error: Uncaught --> Smarty: unable to write file /var/www/vhosts/***.co.uk/httpdocs/cache/smarty/compile/4e/96/77/wrt57da99f2d77557_09880881 <-- thrown in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_write_file.php on line 46

 

Any idea what's wrong there?

 

Thanks

Scott

Link to comment
Share on other sites

that looks to be permission issue....could be a couple things, folder/file permission is wrong...or group owner is not your domain name, i.e. you don't have proper group owner.

 

and you want to beat that horse to get 5.6...you will be much happier with performance...

 

note: typical permissions 755/foldes 644 files 664 for .htaccess

Link to comment
Share on other sites

Hmmm, I've tried setting the folders mentioned in the error message to 777 but still not working. When I clear cache in the back office, I get the following error:

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/var/www/vhosts/***.co.uk/httpdocs/cache/smarty/compile/db): failed to open dir: Permission denied' in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php:242 Stack trace: #0 [internal function]: RecursiveDirectoryIterator->__construct('/var/www/vhosts...', 0) #1 /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php(242): RecursiveDirectoryIterator->getChildren() #2 /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/Smarty.class.php(1469): Smarty_Internal_Utility::clearCompiledTemplate(NULL, NULL, NULL, Object(SmartyCustom)) #3 /var/www/vhosts/***.co.uk/httpdocs/classes/SmartyCustom.php(99): Smarty->clearCompiledTemplate() #4 /var/www/vhosts/***.co.uk/httpdocs/classes/SmartyCustom.php(109): SmartyCustomCore->check_compile_cache_invalidation() #5 /var/www/vhos in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php on line 242
Edited by spaceman (see edit history)
Link to comment
Share on other sites

omg 777!  give me like 500 push ups....never do that...

 

you need to do a full review of how permissions work...especially on owner of file.

 

I think you created this space manually,  and not via a hosting control panel....

 

 

http://mason.gmu.edu/~montecin/UNIXpermiss.htm

Edited by El Patron (see edit history)
Link to comment
Share on other sites

Haha, I do get a bit lost with it all once I start meddling but I just tried it to briefly give me full access, in case I was missing something. It was pointless anyway because it still didn't work!

 

It's an install via Plesk so everything was pretty standard.

 

I'm getting myself into a mess now, I think it might be best if I copy the db and the images and do a fresh install to start again?

Link to comment
Share on other sites

Haha, I do get a bit lost with it all once I start meddling but I just tried it to briefly give me full access, in case I was missing something. It was pointless anyway because it still didn't work!

 

It's an install via Plesk so everything was pretty standard.

 

I'm getting myself into a mess now, I think it might be best if I copy the db and the images and do a fresh install to start again?

 

yes, I use plesk so you should not be having group owner issue...it will  create owner  with your domain name....

 

what are permissions for folder cache?

 

how far along are you with catalog  build?  

Edited by El Patron (see edit history)
Link to comment
Share on other sites

I think I've reverted them all back to the original now, so folder permission for /cache is rwx r-x r-x (I believe I'm right in thinking that's 755?).

 

Quite far along with the catalogue build really, but I'm assuming it should be quite straight forward if I just copy the db and start again?  Or am setting myself up for a big fall...?

Link to comment
Share on other sites

I think I've reverted them all back to the original now, so folder permission for /cache is rwx r-x r-x (I believe I'm right in thinking that's 755?).

 

Quite far along with the catalogue build really, but I'm assuming it should be quite straight forward if I just copy the db and start again?  Or am setting myself up for a big fall...?

 

I'd fix issues....not rebuild....I'm sure you can get it sorted without resorting to doing anything drastic....

Edited by El Patron (see edit history)
Link to comment
Share on other sites

Thanks Denver, I need to have a little look into that to work out how to do that via SSH (I have multiple sites on the server and I'm a novice so haven't managed to work it out yet). I need to pop out for a while now but I'll try again later - thanks both of you for your help, much appreciated.

Link to comment
Share on other sites

Thanks Denver, I need to have a little look into that to work out how to do that via SSH (I have multiple sites on the server and I'm a novice so haven't managed to work it out yet). I need to pop out for a while now but I'll try again later - thanks both of you for your help, much appreciated.

Try https://winscp.net/eng/download.php comes with Putty for SSH login. I assume you know how to create SSH keys?

Link to comment
Share on other sites

 bash commands..@denver way to scare the locals...jajajajaja

 

why they don't put command line processor into back  office hostinig...is a mystrey to me.

 

@denver, any of the popular ftp programs allow recursive permission setting?  I use dw ftp so don't know others that closely.

 

plesk file manager allows permission changes (mine v12 something)  but I don't think recursive.

Edited by El Patron (see edit history)
Link to comment
Share on other sites

I think think this might have defeated me.  I'm using FireSSH and have tried logging in as 'root' and the domain subscriber but when I enter this:

find . -type f -exec chmod 0644 () \;

I get this:

-bash: syntax error near unexpected token `('

And I don't know how to post the /etc/.my.cnf file (I can't access the /etc files via Plesk but assume there's a way using SSH, but I don't know how).

 

Sorry Denver, I appreciate your help but think I've bitten off a little more than I can chew.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...