EmergencyEMERGENCY? Get 24/7 Help Now!

PHP Sessions – Files vs Database Based

 | March 27, 2007 |  Posted In: Insight for Developers

One may think changing PHP session handler from file based to database driven is fully transparent. In many cases it is, sometimes however it may cause some unexpected problems as happened to one of our customers. If you use file based sessions PHP will lock session file for whole script execution duration, which means all […]

Read More

Content delivery system design mistakes

 | February 11, 2007 |  Posted In: Insight for Developers

This week I helped dealing with performance problems (part MySQL related and part related to LAMP in general) of system which does quite a bit of content delivery, serving file downloads and images – something a lot of web sites need to do these days. There were quite a bit of mistakes in design for […]

Read More

Debugging sleeping connections with MySQL

 | February 8, 2007 |  Posted In: Insight for DBAs

Have you ever seen connection in the SHOW PROCESSLIST output which is in “Sleep” state for a long time and you have no idea why this would happen ? I see if frequently with web applications and it is often indication of trouble. Not only it means you may run out of MySQL connections quicker […]

Read More

Why do you need many apache children ?

 | February 5, 2007 |  Posted In: Insight for Developers

I already wrote kind of about same topic a while ago and now interesting real life case makes me to write again 🙂 Most Web applications we’re working with have single tier web architecture, meaning there is just single set of apache servers server requests and nothing else – no dedicated server for static content, […]

Read More

Are PHP persistent connections evil ?

 | November 12, 2006 |  Posted In: Insight for Developers

As you probably know PHP “mysql” extension supported persistent connections but they were disabled in new “mysqli” extension, which is probably one of the reasons some people delay migration to this extension. The reason behind using persistent connections is of course reducing number of connects which are rather expensive, even though they are much faster […]

Read More

Wishes for new “Pure PHP” MySQL driver

 | October 28, 2006 |  Posted In: Insight for Developers

If you’re following MySQL or PHP landscape you should have seen announcement by MySQL to develop pure PHP driver. If not – Here is FAQ . I’m to meet the team (Georg, Andrey etc) which will be developing this driver during my visit to Open Source Database Conference in November so I thought it would […]

Read More

Should MySQL and Web Server share the same box ?

 | October 16, 2006 |  Posted In: Insight for DBAs

This is interesting question which I thought it would be good to write about. There are obviously benefits and drawbacks for each of methods. Smaller applications usually start with single server which has both MySQL and Web server on it. In this case it is not usually the question but once application growths larger and […]

Read More

APC or Memcached

 | September 27, 2006 |  Posted In: Insight for Developers

A while back I did Cache Performance Comparison for LAMP Stack. Looking at this data you can see memcached is about 5 times as slow as APC, and this is with tests done on localhost – with network difference is going to be larger, even with fastest network. Such latency can add up especially if […]

Read More

Database problems in MySQL/PHP Applications

 | August 11, 2006 |  Posted In: Insight for Developers

Article about database design problems is being discussed by Kristian. Both article itself and responce cause mixed feellings so I decided it is worth commenting: 1. Using mysql_* functions directly This is probably bad but I do not like solutions proposed by original article ether. PEAR is slow as well as other complex conectors. I […]

Read More