Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Server config questions Rate Topic   - - - - -

 
  • Scott_C
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 452 posts

Posted 24 February 2012 - 09:48 AM #1

Hi, we're in process of setting up a dedicated server, and we have the choice to configure it exactly the way we want.

I had a few config questions, aside from the basic config options that im already aware of.

- SHMEM - can this caching method be used on 3 x Cs Cart websites all running on the same web server? The server comes with a total of 2gb ram. (Is shmem still considered the best caching method if resources allow?)

- suPHP - is this the best choice of php handler? If so, is it true that i dont change the skins, var and images directory to 777?

- Was going to go with CENTOS for the operating system, anyone have a better choice?

Thanks in advance,

Scott.

 

Posted 25 February 2012 - 12:20 AM #2

Centos / suPHP ~ Unsure about SHMEM given your circumstances.
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 216 posts

Posted 25 February 2012 - 12:59 AM #3

Centos / suPHP ~ Unsure about SHMEM given your circumstances.


I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.

 
  • Scott_C
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 452 posts

Posted 25 February 2012 - 04:18 AM #4

Thanks for the answers guys. Jesse - did you know if i have to alter any directory permissions under suPhp?

I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.


Are you able to elaborate on that? What specific realpath_cache settings did you employ? I've already set the maximum memory limit in config.local.php to;

// Set maximum memory limit
@ini_set('memory_limit', '128M');

I seem to remember reading that 128mb was the maximum. Can the server php core memory itself handle a larger memory setting? Makes sense I guess, i think the memory setting in the config.local.php file is for one instance of an application, not a server-wide setting.

I actually do run SmartOptimizer - it was a little tricky in the initial setup but it seems to help quite a bit. It mostly came down to configuring the .htaccess file properly and making the cache directory inside Smartoptimizer writable.

Cheers,

Scott.

 

Posted 25 February 2012 - 09:02 AM #5

I also changed the default server php core memory limit to 256, changed PHP realpath_cache settings, and some other php settings and it seems pretty speedy now, even though I was never able to get smartoptimzer fully working.


I recommend a higher value than 256 if your CPU speed isn't upto scratch and/or you expect visitors.
My server php core is plentiful as I don't allow anything except Wordpress and CS-Cart to be installed.

CS-Cart have per-account max usage of 512MB, this is normally to ensure that if the site gets hit by mass-traffic then it'll stand on it's two legs for upto an hour before I raise resources limits to cope.

Thanks for the answers guys. Jesse - did you know if i have to alter any directory permissions under suPhp?



Are you able to elaborate on that? What specific realpath_cache settings did you employ? I've already set the maximum memory limit in config.local.php to;

// Set maximum memory limit
@ini_set('memory_limit', '128M');

I seem to remember reading that 128mb was the maximum. Can the server php core memory itself handle a larger memory setting? Makes sense I guess, i think the memory setting in the config.local.php file is for one instance of an application, not a server-wide setting.

I actually do run SmartOptimizer - it was a little tricky in the initial setup but it seems to help quite a bit. It mostly came down to configuring the .htaccess file properly and making the cache directory inside Smartoptimizer writable.

Cheers,

Scott.


All directory permissions under public_html must be modified - run these commands against the respective paths.

Example:

root@yoursever [/home/<cpanelaccount>/public_html]# find . -type d -exec chmod 755 {} \;
root@yoursever [/home/<cpanelaccount>/public_html]# find . -type f -exec chmod 644 {} \;
root@yoursever [/home/<cpanelaccount>/public_html]# find . -type f -name '*.php' -exec chmod 600 {} \;


It's a delicate pain in the butt, but I haven't had any security issues.
Be aware that if you have a large website either by way of page load OR/AND visitors then you'll need some serious CPU power.
I have a client whom started on suPHP and moved all the way to having to use DSO permissions for this reason with compression technology (eAccelarator).

Now, that being said - depending on server resources can you do what you want.
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 216 posts

Posted 25 February 2012 - 11:12 AM #6

My my.cnf looks like this....it may need some tweaking still too, but I don't have much on my server right now, still working on moving my site over. Just a test site and wordpress site on there now. I should have overkill on resources, it's a dedicated with 3.2 xeon/8gb ram.

[mysqld]
datadir=/var/lib/mysql
skip-locking
safe-show-database
old_passwords=1
long_query_time=2
log-slow-queries=/var/log/mysql-slow-queries.log
query_cache_limit=2M
query_cache_size=64M
query_cache_type=1
max_user_connections=50
max_connections=500
thread_cache_size=256
table_cache=1024
key_buffer=256M
max_connect_errors=20
max_allowed_packet=128M
join_buffer=2M
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
read_rnd_buffer_size=2M
thread_concurrency=4
myisam_sort_buffer_size=64M
local-infile=0
concurrent_insert=2

 
  • Scott_C
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 452 posts

Posted 25 February 2012 - 01:53 PM #7

Hi Guys, thank you very much for all this information! Just one quick question, if I can't use shmem for the caching method, I'd like to get sqlite working. In the past, when I've had the module installed and then rolled out onto my live Cs Cart site I received the error;

Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 5, database is locked in /home/USER/public_html/core/cache/class.cache_backend_sqlite.php on line 133

Dotell - I noticed you have a command listed above that reads; "skip-locking" - is this specific to the mysql dbs, and do you think this might help in avoiding the error I'm getting?

It's a nasty bug because a) Its writes itself out to the browser for everyone to see and B) It seems to take its time to manifest - i.e; might site could run well for 24 hours under sqlite caching and then the error appears. Once it does, it seems to happen more and more frequently.

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 216 posts

Posted 26 February 2012 - 12:42 PM #8

Dotell - I noticed you have a command listed above that reads; "skip-locking" - is this specific to the mysql dbs, and do you think this might help in avoiding the error I'm getting?


This was a default setting on my new server.

http://stackoverflow...ng-in-my-cnf-do

 
  • Scott_C
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 452 posts

Posted 27 February 2012 - 05:58 AM #9

Thank you.

This was a default setting on my new server.

http://stackoverflow...ng-in-my-cnf-do