I have a Joomla 1.5.10 based Intranet system. In this application, we have more than 80% custom extensions. Below is the configuration:
Apache version : Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8
PHP version : 5.3.13
MySQL version : mysqlnd 5.1.11
It has 3 dedicated Appliocation Server which configuration is :
Windows Server 2008 Standard Edition Service Pack 2
Compiler: MSVC9 (Visual C++ 2008)
Architecture: x86
Again, it has dedicated DB server which configuration is :
8x Intel(R) Xeon(R) CPU X5460 #3.16GHz, 8.0GB RAM, Windows Server 2008 Standard Edition Service Pack 2.
Below is the MySQL settings in my system:
Sl.# Parameter Value
1 Key Buffer 547M
2 Sort Buffer Size 256K
3 Query cache limit 4M
4 Cache size 350M
5 Long query time 5
6 Interactive timeout 300
7 Max Connection 800
8 Thread cache size 36
We have configured WAMPSERVER (32 BITS & PHP 5.3) 2.2E on our servers and then install MySQL5.1 on other dedicated server. Hence, we are not using MySQL provided with WAMP.
My system become too slow or crash when number of DB connection threads crossed 100. Number of logged-in users we can see are 3000-5000 only. Multiple queries start logging in the slow query logs and huge number of queries are in sleep state. Those queries which are running normal also start logging in slow query log and taking much time in execution.
I am unable to find the bottlenecks in my system. Is there Joomla or MySQL creating bottlenecks. Would upgrade helpful to avoid the bottlenecks and increased the performance of our system? If yes, what should we upgrade - Joomla or MySQL and what will be the strategy to upgrade the system. Is there a known performance/scalability issue in 1.5.10 that is resolved by an upgrade?
My overall goal is to increase the system performance.
Thanks in advance.
First of all as mentioned in my comments, upgrading your CMS to atleast Joomla 1.5.26 will help. You're running PHP 5.3 and only Joomla 1.5.15+ is fully compatible with this PHP version. Seeing as you're using 1.5.10, there will be some issues there.
Apache is not an issue here. There are sites out there running Joomla that have thousands of users and run Aache without any problems, so not to worry about this.
From Joomla 1.6 onwards, the optimization started. Reduced and sorted database tables, endless bug fixes and also security issues. The framework has also improved majorly not to mention it supports PDO, mysqli (more secure than mysql) and postgre. Ugrading to Joomla 3.2 (latest version) will be of course a massive step. You will have to make all your custom extensions compatible with the new Joomla version and keep up to date with the latest coding standards. Even though this is a big step and will of course take some time, it's fully worth it. Joomla 1.5 hasn't been supported for a long time now and things are moving forward majorly.
Your server specs are good, you're running a decent PHP and Apache version, you're MySQL version could be upgraded however it's still not bad. So overall, it's not a server related issue.
I do think that it could very well be the way your custom extensions have been coded. So my final suggest would simply be taking a backup of your site and start migrating it and all of your extensions to Joomla 3.2.
You can change the webserver. Apache is totally bloat. Lighttpd can help to fix the problem. It' also simpler to run. A cms upgrade most likely break something.
Related
Good day,
We are currently running a fairly intensive system on PHP 5.5 connecting to a Redis database. The current setup has 6 Ubuntu 14.04 AWS instances dedicated to PHP and everything works fine. Due to some updated functionalities, we need to upgrade to PHP7 so I created a few Ubuntu 16.04 servers with PHP 7.0.28-0ubuntu0.16.04.1. We are using Predis (https://github.com/nrk/predis) to connect to the database but when I switch over to the 4 x PHP7 servers, I get random timeouts (not constant) - when these occur and because of the locking mechanism we have in place, the whole site becomes unresponsive for a few seconds.
So my question is mainly, has anyone ever got these issues? I think I have read some places that installing the phpredis extension helps, but that may have been a while back and I am not sure it's relevant here. Any insight on why I would need (or not) the extension would be useful.
I have copied the PHP settings from the old installation to the new one by comparing the INI and other configuration files but can post if needed.
I'm running multiple SugarCRM sites on IIS 6.1 on a Windows 2008 environment. Databases are housed on a SQL 2008 R2 Server. We are running PHP 5.3.26 with Fast-CGI enabled. Wincache 1.3.4.0 is also enabled.
It appears that php-cgi.exe is crashing when a site is under heavy load,(20 + users) I managed to debug a crashed instance of php-cgi.exe and here's what I found -
In php cgi__PID__17080__Date__03_15_2015__Time_01_14_04PM__478__Second_Chance_Exception_C0000005.dmp the assembly instruction at kernel32!InterlockedIncrement+9 in C:\Windows\SysWOW64\kernel32.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to write to memory location 0x00000001 on thread 0
Thread report
Thread 0 - System ID 15852
Entry point php_cgi+656a
Create time 15/03/2015 10:02:43
Time spent in user mode 0 Days 00:00:25.031
Time spent in kernel mode 0 Days 00:00:40.406
This thread is not fully resolved and may or may not be a problem.
Further analysis of these threads may be required.
Function kernel32!InterlockedIncrement+9
php_wincache!get_module+c592
php5!php_pdo_stmt_delref+efb6
I am not sure what the above debug means. Can anyone advise what the error means and how I can prevent it from happening?
Thank you
PHP 5.3 is no longer supported. And, with that, WinCache on PHP 5.3 is also no longer supported. However, the last build of WinCache for PHP 5.3 was 1.3.6.3, available here. It contains several performance and stability improvements.
If you move to PHP 5.4, you can pick up more recent builds of WinCache that are even more stable and have new features such as function rerouting, and reduced dependence on the System Page File.
I rent Windows 2008 64 R2 on a shared hosting environment with the following specs:
Intel XEON E5520 # 2.27GHZ
2 GB RAM
IIS 7.5
PHP v5.4
MySQL 5.5.27
FastCGI
Normally, I develop for .NET, and my websites are working great with fast rendering times.
However, I have a couple of Wordpress sites as well, and they are rather slow compared to the .NET websites. Today, I decided to investigate this. I just installed a fresh WordPress 3.8 copy using WPI (Web Platform Installer).
The website takes about 1.1 seconds to render (so it takes 1.1 seconds before any response is returned from my web server), which is, in my opinion, really slow.
I didn't install PHP/MySQL on the server myself, but I think that the best well known practices are in place, at least FastCGI is installed.
But still, I believe that Wordpress should be performing much better, even on a WIMP environment.
So, my questions are:
Should I expect more performance with this setup on the given environment (no additional optimizations such as caching), or is 1.1 seconds of rendering time normal?
And if so, any ideas on what's going on?
Btw, I know that I can speedup Wordpress somewhat by using plugins like W3TC.
Today, I finally was able to fix my slow loading problem; until now, my Wordpress sites where still loading slowly.
By chance, I stumbled upon this article:
http://www.customfitonline.com/news/2013/6/20/solve-wordpress-on-windows-server-problems/
I was like, let's try that "Slow Page Loading" tip, change localhost to 127.0.0.1 in wp_config.php:
define('DB_HOST', 'localhost');
To
define('DB_HOST', '127.0.0.1');
Sure enough, this setting makes a HUGE difference in page loading!
I've been learning up on PHP, and a lot of the time in the books and tutorials I read, features come up as having been introduced in PHP 5. I don't know anything about PHP history, so I don't know if I can safely use these features on most servers. I know in Python, adoption of new versions is very slow (few apps use 3.x, most desktops have 2.6, many server distros like Red Hat have versions as early as 2.4).
Is there a similar situation in the PHP ecosystem? My server has version 5.2, but are some servers still running PHP 4? What version of PHP can I safely assume a server would run?
PHP 5 was released in 2004, and PHP 4 reached End of Life at the end of 2007. You can safely assume that the server has at least 5.0.
PHP 5.3 was released in 2009, but there are still major pieces of software that have not fully taken into account everything that was changed in it; additionally, there are still distributions within their mainstream support cycles (like fairly recent versions of Ubuntu and Debian) that do not have it by default.
However, assuming PHP 5.2 is definitely safe.
At this point you should expect if not demand PHP 5.2.x. If your host doesnt have that, switch hosts - they dont deserve your money. PHP 5.3 on the other hand is a different story... not all shared hosts offer that yet so youll want to check it before deploying or setting up an account if thats the version youre targeting.
I wouldn't assume minimum versions of any software installed anywhere. I'm sure there are people still running PHP4 in 2010. Having said that, I also wouldn't be developing any new software targeted at PHP4 in 2010. PHP 5.2 is probably a good, practical choice at this point in time.
Distrowatch can be a useful resource for this type of question. Here's an example: It appears that RedHat went to PHP 5 in RHEL 5.5, which came out in March. That's not actually so long ago; it wouldn't surprise me if some enterprise users haven't upgraded (I work at a large university and we have many production servers running RHEL 4).
Nonetheless, if we were going to run a PHP app on one of those servers, it's a safe bet that we would update PHP. I'd use 5.2 and just document the requirement.
So, we've got some current data after all:
http://phpadvent.org/2010/usage-statistics-by-ilia-alshanetsky
PHP version | usage at the end of 2010
---------------+----------------------------
4.4 | 6%
4.4 | 16%
5.1 | 8%
5.2 | 66%
5.3 | 4%
And a more recent analyzation (says June 2011)
http://w3techs.com/technologies/details/pl-php/5.3/all
5.3 | 8.6% (from 6.6%/0.764)
Most web hosting providers are using PHP5. Some of them still provide both use of PHP 4 & 5 on a hosting account. In any case keep on with development in PHP5.
I am working on a website which is hosted on a VPS with CENTOS 5.4 i686 virtuozzo installed. I have a drupal installation on the server which gets around 100s of authenticated users at the same time.But at a certain point of time the server stopped responding and the site went offline. So, I tried installing the opcode cache - Alternative PHP Cache.
While the rest parts of the server work fine, the Drupal installation crashes as soon as I install PECL APC with the following message
Fatal error:Cannot run code from this file in conjunction with non encoded files in /home/apogee/public_html/2010/themes/zen/zen/block.tpl.php.
Could you please tell me a way to properly configure Drupal to use APC ?
Thanks
niting
I think the error comes from Zend Encoder...if you don't need it installed then uninstall it and see if that fixes things. If you do need it (closed-source module?), then not sure if that and APC can play nicely together...
you must be disable APC on php.ini
apc.enabled=0
APC and Zend Optimizer can't work with together
David Strauss at four kitchens has done some work on getting Pressflow (Performance tuned Drupal distribution) to work well with APC https://wiki.fourkitchens.com/display/PF/Tuning+APC.
With that much concurrent usage it may be worth your while to look into pressflow.
I have a couple of websites using APC and I've never seen that kind of error -- even with the Drupal-based ones.
After a bit of searching, it seems related to Zend Optimizer and/or Encoder (see the last answer on this thread, for instance), and not to Drupal itself.
I suppose you should use either Zend products, or APC, but not a combinaison of both.